From 8ed27a063060cb04523692f4a610bf5953455605 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Wed, 30 Oct 2024 11:37:41 +0000 Subject: [PATCH] Fix tests Signed-off-by: Pablo Galindo --- Lib/test/test_embed.py | 4 +--- Lib/test/test_perf_profiler.py | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Lib/test/test_embed.py b/Lib/test/test_embed.py index 688848bdd45d25..7089bc6497a24b 100644 --- a/Lib/test/test_embed.py +++ b/Lib/test/test_embed.py @@ -1768,8 +1768,6 @@ def test_init_set_config(self): self.check_all_configs("test_init_set_config", config, api=API_ISOLATED) - @unittest.skipIf("-D_Py_JIT" in (sysconfig.get_config_var('PY_CORE_CFLAGS') or ''), - "JIT and perf don't work together") def test_initconfig_api(self): preconfig = { 'configure_locale': True, @@ -1783,7 +1781,7 @@ def test_initconfig_api(self): } config_dev_mode(preconfig, config) self.check_all_configs("test_initconfig_api", config, preconfig, - api=API_ISOLATED) + api=API_ISOLATED, env={'PYTHON_JIT': '0'}) def test_initconfig_get_api(self): self.run_embedded_interpreter("test_initconfig_get_api") diff --git a/Lib/test/test_perf_profiler.py b/Lib/test/test_perf_profiler.py index b55d441759eb69..1e74990878007a 100644 --- a/Lib/test/test_perf_profiler.py +++ b/Lib/test/test_perf_profiler.py @@ -210,14 +210,14 @@ def test_sys_api_with_existing_trampoline(self): sys.activate_stack_trampoline("perf") sys.activate_stack_trampoline("perf") """ - assert_python_ok("-c", code) + assert_python_ok("-c", code, PYTHON_JIT="0") def test_sys_api_with_invalid_trampoline(self): code = """if 1: import sys sys.activate_stack_trampoline("invalid") """ - rc, out, err = assert_python_failure("-c", code) + rc, out, err = assert_python_failure("-c", code, PYTHON_JIT="0") self.assertIn("invalid backend: invalid", err.decode()) def test_sys_api_get_status(self): @@ -228,7 +228,7 @@ def test_sys_api_get_status(self): sys.deactivate_stack_trampoline() assert sys.is_stack_trampoline_active() is False """ - assert_python_ok("-c", code) + assert_python_ok("-c", code, PYTHON_JIT="0") def is_unwinding_reliable_with_frame_pointers():