Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Galindo <[email protected]>
  • Loading branch information
pablogsal committed Oct 30, 2024
1 parent e1cb96f commit 8ed27a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions Lib/test/test_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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")
Expand Down
6 changes: 3 additions & 3 deletions Lib/test/test_perf_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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():
Expand Down

0 comments on commit 8ed27a0

Please sign in to comment.