You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by sb...@apache.org on 2026/07/02 19:20:50 UTC
(tooling-trusted-releases) branch sbp updated: Ensure that unit test skips in CI are correctly scoped
This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch sbp
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/sbp by this push:
new 060cbdd4 Ensure that unit test skips in CI are correctly scoped
060cbdd4 is described below
commit 060cbdd46020bfb49ed80a83058c1f81049dd68d
Author: Sean B. Palmer <se...@miscoranda.com>
AuthorDate: Thu Jul 2 20:20:22 2026 +0100
Ensure that unit test skips in CI are correctly scoped
---
tests/contract/conftest.py | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/tests/contract/conftest.py b/tests/contract/conftest.py
index 2c38e0b1..b36ccf97 100644
--- a/tests/contract/conftest.py
+++ b/tests/contract/conftest.py
@@ -16,14 +16,18 @@
# under the License.
import os
+import pathlib
import pytest
def pytest_collection_modifyitems(config, items):
- if not os.environ.get("TOOLING_ACTIONS_PATH"):
- skip = pytest.mark.skip(
- reason=("TOOLING_ACTIONS_PATH not set; point it at a tooling-actions checkout to enable contract tests")
- )
- for item in items:
+ if os.environ.get("TOOLING_ACTIONS_PATH"):
+ return
+ skip = pytest.mark.skip(
+ reason=("TOOLING_ACTIONS_PATH not set; point it at a tooling-actions checkout to enable contract tests")
+ )
+ directory = pathlib.Path(__file__).parent
+ for item in items:
+ if item.path.is_relative_to(directory):
item.add_marker(skip)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org