def testParse(self): """Test if all records in a HIE file are being read.""" count = 0 with open(self.filename) as f: for record in Hie.parse(f): count += 1 self.assertEqual(count, 21)
def testParse(self): f = open(self.filename) try: count = 0 for record in Hie.parse(f): count += 1 assert count == 21, "Wrong number of records?! " + str(count) finally: f.close()
def testParse(self): f = open(self.filename) try: count = 0 for record in Hie.parse(f): count +=1 assert count == 21, "Wrong number of records?! "+str(count) finally: f.close()
def testParse(self): """Test if all records in a HIE file are being read.""" f = open(self.filename) try: count = 0 for record in Hie.parse(f): count += 1 self.assertEqual(count, 21) finally: f.close()
def testParse(self): """Test if all records in a HIE file are being read""" f = open(self.filename) try: count = 0 for record in Hie.parse(f): count += 1 self.assertEqual(count, 21) finally: f.close()