[Python-checkins] r73181 - in sandbox/trunk/2to3/lib2to3/tests: pytree_idempotency.py test_all_fixers.py test_fixers.py test_parser.py test_pytree.py test_util.py

benjamin.peterson python-checkins at python.org
Wed Jun 3 20:24:48 CEST 2009


Author: benjamin.peterson
Date: Wed Jun  3 20:24:48 2009
New Revision: 73181

Log:
remove shebang lines and __main__ sections

Modified:
   sandbox/trunk/2to3/lib2to3/tests/pytree_idempotency.py
   sandbox/trunk/2to3/lib2to3/tests/test_all_fixers.py
   sandbox/trunk/2to3/lib2to3/tests/test_fixers.py
   sandbox/trunk/2to3/lib2to3/tests/test_parser.py
   sandbox/trunk/2to3/lib2to3/tests/test_pytree.py
   sandbox/trunk/2to3/lib2to3/tests/test_util.py

Modified: sandbox/trunk/2to3/lib2to3/tests/pytree_idempotency.py
==============================================================================
--- sandbox/trunk/2to3/lib2to3/tests/pytree_idempotency.py	(original)
+++ sandbox/trunk/2to3/lib2to3/tests/pytree_idempotency.py	Wed Jun  3 20:24:48 2009
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2.5
+#!/usr/bin/env python
 # Copyright 2006 Google, Inc. All Rights Reserved.
 # Licensed to PSF under a Contributor Agreement.
 

Modified: sandbox/trunk/2to3/lib2to3/tests/test_all_fixers.py
==============================================================================
--- sandbox/trunk/2to3/lib2to3/tests/test_all_fixers.py	(original)
+++ sandbox/trunk/2to3/lib2to3/tests/test_all_fixers.py	Wed Jun  3 20:24:48 2009
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.5
 """Tests that run all fixer modules over an input stream.
 
 This has been broken out into its own test module because of its
@@ -6,18 +5,13 @@
 """
 # Author: Collin Winter
 
-# Testing imports
-try:
-    from . import support
-except ImportError:
-    import support
-
 # Python imports
 import unittest
 
 # Local imports
 from .. import pytree
 from .. import refactor
+from . import support
 
 class Test_all(support.TestCase):
     def setUp(self):
@@ -28,8 +22,3 @@
         for filepath in support.all_project_files():
             print "Fixing %s..." % filepath
             self.refactor.refactor_file(filepath)
-
-
-if __name__ == "__main__":
-    import __main__
-    support.run_all_tests(__main__)

Modified: sandbox/trunk/2to3/lib2to3/tests/test_fixers.py
==============================================================================
--- sandbox/trunk/2to3/lib2to3/tests/test_fixers.py	(original)
+++ sandbox/trunk/2to3/lib2to3/tests/test_fixers.py	Wed Jun  3 20:24:48 2009
@@ -1,12 +1,4 @@
-#!/usr/bin/env python2.5
 """ Test suite for the fixer modules """
-# Author: Collin Winter
-
-# Testing imports
-try:
-    from tests import support
-except ImportError:
-    import support
 
 # Python imports
 import os
@@ -16,6 +8,7 @@
 
 # Local imports
 from lib2to3 import pygram, pytree, refactor, fixer_util
+from lib2to3.tests import support
 
 
 class FixerTestCase(support.TestCase):

Modified: sandbox/trunk/2to3/lib2to3/tests/test_parser.py
==============================================================================
--- sandbox/trunk/2to3/lib2to3/tests/test_parser.py	(original)
+++ sandbox/trunk/2to3/lib2to3/tests/test_parser.py	Wed Jun  3 20:24:48 2009
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.5
 """Test suite for 2to3's parser and grammar files.
 
 This is the place to add tests for changes to 2to3's grammar, such as those
@@ -6,7 +5,6 @@
 parts of the grammar we've changed, we also make sure we can parse the
 test_grammar.py files from both Python 2 and Python 3.
 """
-# Author: Collin Winter
 
 # Testing imports
 from . import support
@@ -207,8 +205,3 @@
         return os.system("diff -u %s @" % fn)
     finally:
         os.remove("@")
-
-
-if __name__ == "__main__":
-    import __main__
-    support.run_all_tests(__main__)

Modified: sandbox/trunk/2to3/lib2to3/tests/test_pytree.py
==============================================================================
--- sandbox/trunk/2to3/lib2to3/tests/test_pytree.py	(original)
+++ sandbox/trunk/2to3/lib2to3/tests/test_pytree.py	Wed Jun  3 20:24:48 2009
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.5
 # Copyright 2006 Google, Inc. All Rights Reserved.
 # Licensed to PSF under a Contributor Agreement.
 
@@ -462,8 +461,3 @@
         r = {}
         self.assert_(pattern.match(node, r))
         self.assertEqual(r["args"], [l2])
-
-
-if __name__ == "__main__":
-    import __main__
-    support.run_all_tests(__main__)

Modified: sandbox/trunk/2to3/lib2to3/tests/test_util.py
==============================================================================
--- sandbox/trunk/2to3/lib2to3/tests/test_util.py	(original)
+++ sandbox/trunk/2to3/lib2to3/tests/test_util.py	Wed Jun  3 20:24:48 2009
@@ -1,6 +1,4 @@
-#!/usr/bin/env python2.5
 """ Test suite for the code in fixes.util """
-# Author: Collin Winter
 
 # Testing imports
 from . import support
@@ -552,8 +550,3 @@
         node = parse('bar()')
         fixer_util.touch_import(None, "cgi", node)
         self.assertEqual(str(node), 'import cgi\nbar()\n\n')
-
-
-if __name__ == "__main__":
-    import __main__
-    support.run_all_tests(__main__)


More information about the Python-checkins mailing list