[Python-checkins] r73977 - sandbox/trunk/2to3/lib2to3/tests/test_refactor.py

benjamin.peterson python-checkins at python.org
Sun Jul 12 17:16:07 CEST 2009


Author: benjamin.peterson
Date: Sun Jul 12 17:16:07 2009
New Revision: 73977

Log:
update get_headnode_dict tests for recent changes

Modified:
   sandbox/trunk/2to3/lib2to3/tests/test_refactor.py

Modified: sandbox/trunk/2to3/lib2to3/tests/test_refactor.py
==============================================================================
--- sandbox/trunk/2to3/lib2to3/tests/test_refactor.py	(original)
+++ sandbox/trunk/2to3/lib2to3/tests/test_refactor.py	Sun Jul 12 17:16:07 2009
@@ -77,11 +77,12 @@
         with_head = FileInputFix({}, [])
         simple = SimpleFix({}, [])
         d = refactor._get_headnode_dict([no_head, with_head, simple])
-        self.assertEqual(d[pygram.python_symbols.file_input],
-                         [with_head, no_head, simple])
-        del d[pygram.python_symbols.file_input]
+        top_fixes = d.pop(pygram.python_symbols.file_input)
+        self.assertEqual(top_fixes, [with_head, no_head])
+        name_fixes = d.pop(token.NAME)
+        self.assertEqual(name_fixes, [simple, no_head])
         for fixes in d.itervalues():
-            self.assertEqual(fixes, [no_head, simple])
+            self.assertEqual(fixes, [no_head])
 
     def test_fixer_loading(self):
         from myfixes.fix_first import FixFirst


More information about the Python-checkins mailing list