From b4a7dde6f0840e3d3deb064279154fcebbd97fe3 Mon Sep 17 00:00:00 2001 From: maximsemenov Date: Mon, 16 Nov 2026 08:48:54 -0800 Subject: [PATCH] ci: fix the nightly marker expression for pytest 9.2 The nightly passes -m "not x" so that it runs every test, including the stress tests that tests/e2e/iothub_e2e/pytest.ini deselects by default (addopts -m "not stress"); a command-line -m replaces that default. "x" is not a registered marker, and pytest 9.2.0 (2026-10-27) now validates marker names in -m expressions when --strict-markers is on, so every test leg fails with "Unknown marker(s) in '-m' expression: x" before running a test. Use "stress or not stress" instead: it selects every test and only references a registered marker. Simply dropping -m would silently stop running the stress tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- vsts/python-nightly.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vsts/python-nightly.yaml b/vsts/python-nightly.yaml index 662a4fba6..00f39899a 100644 --- a/vsts/python-nightly.yaml +++ b/vsts/python-nightly.yaml @@ -191,8 +191,10 @@ stages: - script: | cd $(Build.SourcesDirectory)/tests/e2e/iothub_e2e echo "Using consumer group: ${IOTHUB_E2E_EVENTHUB_CONSUMER_GROUP}" - # "not x" means "include all tests that don't have the tag named 'x'", which is everything. - uv run --no-sync pytest --transport=$(transport) --junitxml=junit/TEST-python-e2e.xml -o junit_suite_name="$(Agent.JobName)" -m "not x" + # The nightly runs every test, including the stress tests that pytest.ini deselects by default + # (addopts -m "not stress"); a command-line -m replaces that default. Use only registered + # markers: pytest 9.2+ rejects unknown marker names in -m with --strict-markers. + uv run --no-sync pytest --transport=$(transport) --junitxml=junit/TEST-python-e2e.xml -o junit_suite_name="$(Agent.JobName)" -m "stress or not stress" displayName: 'E2E Device Client MQTT Connection String' env: IOTHUB_E2E_IOTHUB_CONNECTION_STRING: $(IOTHUB_CONNECTION_STRING)