def test_countext_without_files(self): """Make sure countext.countext returns correct output when no files are in current dir""" self.assertEqual(countext.countext(), [])
def test_countext_with_files(self): """Make sure countext.countext returns a correct count of files with any given extension (or no extension)""" expected = set([('.doc', 2), ('.txt', 1), ('.py', 3), ('', 1)]) found = set(countext.countext()) self.assertEqual(found, expected)