Lines Matching defs:refactor
2 Unit tests for refactor.py.
17 from lib2to3 import refactor, pygram, fixer_base
28 _DEFAULT_FIXERS = refactor.get_fixers_from_package("myfixes")
32 _2TO3_FIXERS = refactor.get_fixers_from_package("lib2to3.fixes")
48 return refactor.RefactoringTool(fixers, options, explicit)
64 non_prefixed = refactor.get_all_fix_names("myfixes")
65 prefixed = refactor.get_all_fix_names("myfixes", False)
66 full_names = refactor.get_fixers_from_package("myfixes")
73 run = refactor._detect_future_features
130 d = refactor._get_headnode_dict([no_head, with_head, simple])
152 self.assertRaises(refactor.FixerError, self.rt, fixers=["no_fixer_cls"])
153 self.assertRaises(refactor.FixerError, self.rt, fixers=["bad_order"])
167 class MyRT(refactor.RefactoringTool):
242 save_func = refactor.RefactoringTool.refactor_file
243 refactor.RefactoringTool.refactor_file = mock_refactor_file
253 refactor.RefactoringTool.refactor_file = save_func
284 fixes = refactor.get_fixers_from_package("lib2to3.fixes")