diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2025-04-25 16:03:03 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2025-04-25 16:14:24 +0300 |
commit | dc030a75ebaefa7cb61f2e7d0103ec8d060b7f30 (patch) | |
tree | 9e8977d52a92c3d18dca13b91ba0d26819555dad | |
parent | b24a00dcb26a76e07659a31d8e81596665547982 (diff) | |
download | ydb-dc030a75ebaefa7cb61f2e7d0103ec8d060b7f30.tar.gz |
Intermediate changes
commit_hash:4d256df3cba483ed480b07058d40dc2771082b86
-rw-r--r-- | library/python/pytest/plugins/collection.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/library/python/pytest/plugins/collection.py b/library/python/pytest/plugins/collection.py index 7ca8efc47e9..8bc375c625d 100644 --- a/library/python/pytest/plugins/collection.py +++ b/library/python/pytest/plugins/collection.py @@ -90,7 +90,9 @@ def _is_skipped_module_level(module): # pytest.skip.Exception https://docs.pytest.org/en/stable/reference/reference.html#pytest-skip try: module.obj - except pytest.skip.Exception: + except pytest.skip.Exception as e: + if not e.allow_module_level: + raise RuntimeError("Using pytest.skip outside of a test will skip the entire module. If that's your intention, pass `allow_module_level=True`.") return True except Exception: # letting other exceptions such as ImportError slip through |