blob: 384ae49413794f933e6694ae7f4d4b4c4c24aefd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
from src.program import Program
from src.exceptions import IncompatibleRowLengthError
import pytest
def test_insert(capsys, insert_program):
insert_program.run()
assert capsys.readouterr()[0] == 'Row added!\n'
def test_out_of_bounds_insert(capsys):
Program(args=['-f', './tests/test_table.csv', '-c', 'insert', '1,2,3,4']).run()
assert capsys.readouterr()[0] == 'Incompatible row length, got 4, expected 3\n'
|