diff --git a/Lib/test/test_embed.py b/Lib/test/test_embed.py index f5adcdffe4668e..647ce6879687f5 100644 --- a/Lib/test/test_embed.py +++ b/Lib/test/test_embed.py @@ -78,7 +78,10 @@ def setUp(self): # "Py_Initialize: Unable to get the locale encoding # LookupError: no codec search functions registered: can't find encoding" self.oldcwd = os.getcwd() - os.chdir(builddir) + if MS_WINDOWS: + os.chdir(support.REPO_ROOT) + else: + os.chdir(builddir) def tearDown(self): os.chdir(self.oldcwd)