class TestParserClass(unittest.TestCase): """Class used to test if .txt file is read.""" def setUp(self): self.parse = Parser() def test_data_is_readfrom_inputfile(self): """Test that read_file method returns a not null value""" self.assertIsNotNone(self.parse.read_file("input.txt"), msg="Parser.rea_file should not return an empty value ")
def __init__(self, inputfile): self.people = Parser.read_file(inputfile)