You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

typo_test.py 3.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. import million.analyze.count_analysis as ca
  2. from test.TestCase import TestCase
  3. class TypoTest(TestCase):
  4. def test_missing_letter_1(self, overrides=None, exclude=None):
  5. assert ca.check_extra_or_missing_letter("4976", "45976") == True
  6. def test_missing_letter_2(self, overrides=None, exclude=None):
  7. assert ca.check_extra_or_missing_letter("4596", "45976") == True
  8. def test_missing_letter_3(self, overrides=None, exclude=None):
  9. assert ca.check_extra_or_missing_letter("5976", "45976") == True
  10. def test_missing_letter_4(self, overrides=None, exclude=None):
  11. assert ca.check_extra_or_missing_letter("4597", "45976") == True
  12. def test_extra_letter_1(self, overrides=None, exclude=None):
  13. assert ca.check_extra_or_missing_letter("459766", "45976") == True
  14. def test_extra_letter_2(self, overrides=None, exclude=None):
  15. assert ca.check_extra_or_missing_letter("545976", "45976") == True
  16. def test_extra_letter_3(self, overrides=None, exclude=None):
  17. assert ca.check_extra_or_missing_letter("452976", "45976") == True
  18. def test_extra_letter_4(self, overrides=None, exclude=None):
  19. assert ca.check_extra_or_missing_letter("459776", "45976") == True
  20. def test_extra_letter_5(self, overrides=None, exclude=None):
  21. assert ca.check_extra_or_missing_letter("45976", "45976") == False
  22. def test_single_letter_differ_1(self, overrides=None, exclude=None):
  23. assert ca.check_single_letter_differ("35976", "45976") == True
  24. def test_single_letter_differ_2(self, overrides=None, exclude=None):
  25. assert ca.check_single_letter_differ("45986", "45976") == True
  26. def test_single_letter_differ_3(self, overrides=None, exclude=None):
  27. assert ca.check_single_letter_differ("44986", "45976") == False
  28. def test_single_letter_differ_4(self, overrides=None, exclude=None):
  29. assert ca.check_single_letter_differ("35975", "45976") == False
  30. def test_single_letter_differ_5(self, overrides=None, exclude=None):
  31. assert ca.check_single_letter_differ("4976", "45976") == False
  32. def test_single_letter_differ_6(self, overrides=None, exclude=None):
  33. assert ca.check_single_letter_differ("4597", "45976") == False
  34. def test_single_letter_differ_7(self, overrides=None, exclude=None):
  35. assert ca.check_single_letter_differ("45976", "45976") == False
  36. def test_letter_swap_1(self, overrides=None, exclude=None):
  37. assert ca.check_letter_swap("45976", "45976") == False
  38. def test_letter_swap_2(self, overrides=None, exclude=None):
  39. assert ca.check_letter_swap("49576", "45976") == True
  40. def test_letter_swap_3(self, overrides=None, exclude=None):
  41. assert ca.check_letter_swap("45967", "45976") == True
  42. def test_letter_swap_4(self, overrides=None, exclude=None):
  43. assert ca.check_letter_swap("47956", "45976") == False
  44. def test_letter_swap_5(self, overrides=None, exclude=None):
  45. assert ca.check_letter_swap("54966", "45976") == False
  46. def test_letter_swap_6(self, overrides=None, exclude=None):
  47. assert ca.check_letter_swap("54967", "45976") == False