[Python-checkins] cpython (2.7): backport from the trunk, to fix test_tools with srcdir != builddir

matthias.klose python-checkins at python.org
Mon Sep 10 14:38:10 CEST 2012


http://hg.python.org/cpython/rev/6d0c54b99ca9
changeset:   78956:6d0c54b99ca9
branch:      2.7
parent:      78952:9c30a69c72ec
user:        doko at ubuntu.com
date:        Mon Sep 10 14:34:42 2012 +0200
summary:
  backport from the trunk, to fix test_tools with srcdir != builddir

        changeset:   77827:c23b442b5d5e
        user:        Antoine Pitrou <solipsis at pitrou.net>
        date:        Thu Jun 28 01:20:26 2012 +0200
        summary:     Avoid using scrdir, it's broken.

        changeset:   77826:f0e58e778215
        user:        Neil Schemenauer <nas at arctrix.com>
        date:        Wed Jun 27 15:58:37 2012 -0600
        summary:     Fix bug in test_tools that prevented building is separate directory.

files:
  Lib/test/test_tools.py |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Lib/test/test_tools.py b/Lib/test/test_tools.py
--- a/Lib/test/test_tools.py
+++ b/Lib/test/test_tools.py
@@ -15,8 +15,8 @@
     # and run the tests in that case too?
     raise unittest.SkipTest('test irrelevant for an installed Python')
 
-srcdir = sysconfig.get_config_var('projectbase')
-basepath = os.path.join(os.getcwd(), srcdir, 'Tools')
+basepath = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))),
+                        'Tools')
 
 
 class ReindentTests(unittest.TestCase):

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list