Skip to content

Commit 8d63f14

Browse files
committed
Fix test_init_setpythonhome
Signed-off-by: Filipe Laíns <lains@riseup.net>
1 parent 36e43a7 commit 8d63f14

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Lib/test/test_embed.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1491,8 +1491,12 @@ def test_init_setpythonhome(self):
14911491
}
14921492
self.default_program_name(config)
14931493
env = {'TESTHOME': home, 'PYTHONPATH': paths_str}
1494+
# When running from source, TESTHOME will be the build directory, which
1495+
# isn't a valid home unless _is_python_build is set. getpath will then
1496+
# fail to find the standard library and show a warning, so we need to
1497+
# ignore stderr.
14941498
self.check_all_configs("test_init_setpythonhome", config,
1495-
api=API_COMPAT, env=env)
1499+
api=API_COMPAT, env=env, ignore_stderr=True)
14961500

14971501
def test_init_is_python_build_with_home(self):
14981502
# Test _Py_path_config._is_python_build configuration (gh-91985)

0 commit comments

Comments
 (0)