From: doko@ubuntu.com Date: Mon, 10 Sep 2012 12:34:42 +0000 (+0200) Subject: backport from the trunk, to fix test_tools with srcdir != builddir X-Git-Tag: v2.7.4rc1~577 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7a8634d8d86041e47b283717424eb2b3cede8c84;p=thirdparty%2FPython%2Fcpython.git backport from the trunk, to fix test_tools with srcdir != builddir changeset: 77827:c23b442b5d5e user: Antoine Pitrou date: Thu Jun 28 01:20:26 2012 +0200 summary: Avoid using scrdir, it's broken. changeset: 77826:f0e58e778215 user: Neil Schemenauer date: Wed Jun 27 15:58:37 2012 -0600 summary: Fix bug in test_tools that prevented building is separate directory. --- diff --git a/Lib/test/test_tools.py b/Lib/test/test_tools.py index 0cad0c4c91ba..10ee27ce08bb 100644 --- a/Lib/test/test_tools.py +++ b/Lib/test/test_tools.py @@ -15,8 +15,8 @@ if not sysconfig.is_python_build(): # 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):