예제 #1
0
파일: test_typo.py 프로젝트: wezs/uktils
 def testResolveRuleWithForcedName(self):
     """
     unit-test for uktils.typo._resolve_rule with forced_name arg
     """
     self.assert_(
         callable(typo._resolve_rule_name('testrule', 'newrule')[1]
     ))
     self.assert_(
         callable(typo._resolve_rule_name(cb_testrule, 'newrule')[1]
     ))
     self.assertEquals(
         'newrule',
         typo._resolve_rule_name('testrule', 'newrule')[0]
     )
     self.assertEquals(
         'newrule',
         typo._resolve_rule_name(cb_testrule, 'newrule')[0]
     )
예제 #2
0
파일: test_typo.py 프로젝트: wezs/uktils
 def testResolveRule(self):
     """
     unit-test for uktils.typo._resolve_rule
     """
     self.assert_(
         callable(
             typo._resolve_rule_name('testrule')[1]
     ))
     self.assert_(
         callable(
             typo._resolve_rule_name(cb_testrule)[1]
     ))
     self.assertEquals(
         'testrule',
         typo._resolve_rule_name('testrule')[0]
     )
     self.assertEquals(
         'cb_testrule',
         typo._resolve_rule_name(cb_testrule)[0]
     )