Skip to content

GH-89858: fix test_embed for Out-of-tree builds #93465

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jun 17, 2022
Prev Previous commit
rebase
  • Loading branch information
kumaraditya303 committed Jun 17, 2022
commit ac481bf7317a8494b1415209af10009ba0d25b4c
9 changes: 2 additions & 7 deletions Lib/test/test_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,16 @@ def setUp(self):
ext = ("_d" if debug_build(sys.executable) else "") + ".exe"
exename += ext
exepath = builddir
expecteddir = os.path.join(support.REPO_ROOT, builddir)
else:
exepath = os.path.join(builddir, 'Programs')
expecteddir = os.path.join(builddir, 'Programs')
self.test_exe = exe = os.path.join(exepath, exename)
if exepath != expecteddir or not os.path.exists(exe):
if 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
# LookupError: no codec search functions registered: can't find encoding"
self.oldcwd = os.getcwd()
if MS_WINDOWS:
os.chdir(support.REPO_ROOT)
else:
os.chdir(builddir)
os.chdir(builddir)

def tearDown(self):
os.chdir(self.oldcwd)
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy