]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45506: Go back to not running most of test_embed in out-of-tree builds. (gh-29063)
authorEric Snow <ericsnowcurrently@gmail.com>
Tue, 19 Oct 2021 20:11:16 +0000 (14:11 -0600)
committerGitHub <noreply@github.com>
Tue, 19 Oct 2021 20:11:16 +0000 (14:11 -0600)
In gh-28954 I adjusted how test_embed determines if it should be skipped. That broke out-of-tree builds. This change fixes them.

https://bugs.python.org/issue45506

Lib/test/test_embed.py

index 4b4396efb5cadb5e993148966681a1bebf9dfe98..4186f011e2388a4a707ac6433273b5d652d21314 100644 (file)
@@ -61,7 +61,7 @@ class EmbeddingTestsMixin:
         else:
             exepath = os.path.join(builddir, 'Programs')
         self.test_exe = exe = os.path.join(exepath, exename)
-        if not os.path.exists(exe):
+        if exepath != support.REPO_ROOT or not os.path.exists(exe):
             self.skipTest("%r doesn't exist" % exe)
         # This is needed otherwise we get a fatal error:
         # "Py_Initialize: Unable to get the locale encoding