bpo-45506: Go back to not running most of test_embed in out-of-tree builds. (gh-29063)

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
This commit is contained in:
Eric Snow 2021-10-19 14:11:16 -06:00 • committed by GitHub
parent a106343f63
commit f4b12440cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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