diff options
author | Ned Deily <nad@acm.org> | 2011-06-28 07:53:54 (GMT) |
---|---|---|
committer | Ned Deily <nad@acm.org> | 2011-06-28 07:53:54 (GMT) |
commit | 4a1ec129996c730556ad9fe9d92062b4ba5dadfc (patch) | |
tree | 8301eb1425136fac8b657b816ef61316a13b6528 /Lib/distutils/tests | |
parent | 8b56c4b1b82898ffd7e6337c39068c93e21e8d31 (diff) | |
parent | 58f27b203c34ec81a14a8d73ce1d5fc5350946a9 (diff) | |
download | cpython-4a1ec129996c730556ad9fe9d92062b4ba5dadfc.zip cpython-4a1ec129996c730556ad9fe9d92062b4ba5dadfc.tar.gz cpython-4a1ec129996c730556ad9fe9d92062b4ba5dadfc.tar.bz2 |
Issue #12141: Install copies of template C module file so that
test_build_ext of test_distutils and test_command_build_ext of
test_packaging are no longer silently skipped when
run outside of a build directory.
Diffstat (limited to 'Lib/distutils/tests')
-rw-r--r-- | Lib/distutils/tests/test_build_ext.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py index a5b9700..d924f58 100644 --- a/Lib/distutils/tests/test_build_ext.py +++ b/Lib/distutils/tests/test_build_ext.py @@ -22,6 +22,11 @@ from test.support import run_unittest ALREADY_TESTED = False def _get_source_filename(): + # use installed copy if available + tests_f = os.path.join(os.path.dirname(__file__), 'xxmodule.c') + if os.path.exists(tests_f): + return tests_f + # otherwise try using copy from build directory srcdir = sysconfig.get_config_var('srcdir') return os.path.join(srcdir, 'Modules', 'xxmodule.c') |