def testCountWords(self): """ Function that tests the countWords function within the Word Counter class. """ # Number of words in text4.txt num = 200 tester = WordCounter("tests/text4.txt") self.assertEqual(tester.countWords(), num)