summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJeong YunWon <69878+youknowone@users.noreply.github.com>2022-10-15 14:57:06 (GMT)
committerGitHub <noreply@github.com>2022-10-15 14:57:06 (GMT)
commit07b5c4699e64eb30c3bdcb1275c167e675d37423 (patch)
tree3a8c65289d07904f8c0ee9aca96a2df9dff4bf2e /Lib
parent4e2bd58af46fef2c913273acbf78a3b1ed934d1d (diff)
downloadcpython-07b5c4699e64eb30c3bdcb1275c167e675d37423.zip
cpython-07b5c4699e64eb30c3bdcb1275c167e675d37423.tar.gz
cpython-07b5c4699e64eb30c3bdcb1275c167e675d37423.tar.bz2
gh-95971: Turn @writes_bytecode_files to skip when not running (#95972)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_importlib/util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_importlib/util.py b/Lib/test/test_importlib/util.py
index c07ac2a..0b6dcc5 100644
--- a/Lib/test/test_importlib/util.py
+++ b/Lib/test/test_importlib/util.py
@@ -298,7 +298,7 @@ def writes_bytecode_files(fxn):
"""Decorator to protect sys.dont_write_bytecode from mutation and to skip
tests that require it to be set to False."""
if sys.dont_write_bytecode:
- return lambda *args, **kwargs: None
+ return unittest.skip("relies on writing bytecode")(fxn)
@functools.wraps(fxn)
def wrapper(*args, **kwargs):
original = sys.dont_write_bytecode