Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
@writes_bytecode_files to skip
  • Loading branch information
youknowone committed Aug 17, 2022
commit 47dbafe7d3ae377559d6979efff363a045a760c1
2 changes: 1 addition & 1 deletion Lib/test/test_importlib/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,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(fxn)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change is submitted to python/cpython#95972

@functools.wraps(fxn)
def wrapper(*args, **kwargs):
original = sys.dont_write_bytecode
Expand Down