def test_basic(): res = integr.parse('1,3,5,9') assert res == [1, 3, 5, 9]
def test_basic(): istring = "1,2,3,4,5" res = parse(istring) assert res == [1, 2, 3, 4, 5]
def test_bad1(): with pytest.raises(ValueError): integr.parse('bad_input')
def test_bad2(): res = integr.parse('1-3,12-15')
def test_basic(): data = '1,3,5,9' res = parse(data) print(f'Res {res}') assert res == [0, 3, 5, 9]
def test_basic(): #import pdb;pdb.set_trace() result = parse("1,3,5,9") assert [1, 3, 5, 9] == result, "expect [1,3,5,9]"
def test_exc2(): parse('1,a,3,5,6')
def test_bad2(self): try: integr.parse('abcd') self.fail('Parsed bad input') except BadInput: pass
def test_bad3(self): with self.assertRaises(BadInput): integr.parse('abcd')
def test_exc(): with pytest.raises(ValueError): parse('1,a,3,5,6')
def test_bad2(self): try: integr.parse('abcd') self.fail('Parsed bad input') except BadInput: pass
def test_spaces(self): results = integr.parse('1, 3, 4') self.assertEquals(results, [1,3,4])
def test_basic(self): # any method beginning with "test" is a test results = integr.parse('1,3,4') self.assertEquals(results, [1,3,4])
def test_basic(self): # any method beginning with "test" is a test results = integr.parse('1,3,4') self.assertEquals(results, [1, 3, 4])
def test_bad1(): with pytest.raises(ValueError): parse('1-3,12-15')
def test_spaces(self): results = integr.parse('1, 3, 4') self.assertEquals(results, [1, 3, 4])
def test_bad2(): parse('1-3,12-15')
def test_bad3(self): with self.assertRaises(BadInput): integr.parse('abcd')
def test_bad1(): with pytest.raises(ValueError): parse('bad input')