8000 gh-95971: Turn @writes_bytecode_files to skip when not running (#95972) · python/cpython@07b5c46 · GitHub
[go: up one dir, main page]

Skip to content

Commit 07b5c46

Browse files
gh-95971: Turn @writes_bytecode_files to skip when not running (#95972)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
1 parent 4e2bd58 commit 07b5c46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_importlib/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def writes_bytecode_files(fxn):
298298
"""Decorator to protect sys.dont_write_bytecode from mutation and to skip
299299
tests that require it to be set to False."""
300300
if sys.dont_write_bytecode:
301-
return lambda *args, **kwargs: None
301+
return unittest.skip("relies on writing bytecode")(fxn)
302302
@functools.wraps(fxn)
303303
def wrapper(*args, **kwargs):
304304
original = sys.dont_write_bytecode

0 commit comments

Comments
 (0)
0