def test_more_complex_file(self): ms = misspellings.Misspellings() errors, results = ms.check( os.path.join(BASE_PATH, 'various_spellings.c')) self.assertEqual(len(errors), 0) self.assertEqual(len(results), 7)
def test_good_file(self): ms = misspellings.Misspellings() errors, results = ms.check( os.path.join(BASE_PATH, 'nine_mispellings.c')) self.assertEqual(len(errors), 0) self.assertEqual(len(results), 9)
def test_broken_ms_list(self): with self.assertRaises(ValueError): misspellings.Misspellings(os.path.join(BASE_PATH, 'broken_msl.txt'))
def test_missing_file(self): ms = misspellings.Misspellings() errors, results = ms.check(os.path.join(BASE_PATH, 'missing_source.c')) self.assertTrue(errors)
def test_missing_ms_list(self): with self.assertRaises(IOError): misspellings.Misspellings( os.path.join(BASE_PATH, 'missing_msl.txt'))