Skip to content

Commit cb037dc

Browse files
kevinjqliuCopilot
andcommitted
Use explicit unit test marker
Rename the synthesized marker to match its semantics and keep the local unit target from collecting the integration test directory. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 9da3935 commit cb037dc

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎.github/workflows/python-ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
- name: Install
9090
run: uv sync --all-extras --no-extra hive-kerberos
9191
- name: Run unit tests
92-
run: uv run python -m pytest tests/ -m unmarked --ignore=tests/integration -v -x
92+
run: uv run python -m pytest tests/ -m unit --ignore=tests/integration -v -x
9393

9494
cibw-dev-env-smoke-test:
9595
runs-on: ubuntu-latest

‎Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ lint: ## Run code linters via prek (pre-commit hooks)
104104
##@ Testing
105105

106106
test: ## Run all unit tests (excluding integration)
107-
$(TEST_RUNNER) pytest tests/ -m unmarked $(PYTEST_ARGS)
107+
$(TEST_RUNNER) pytest tests/ -m unit --ignore=tests/integration $(PYTEST_ARGS)
108108

109109
test-integration: test-integration-setup test-integration-exec test-integration-cleanup ## Run integration tests
110110

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ quote-style = "double"
229229
testpaths = ["tests"]
230230

231231
markers = [
232-
"unmarked: marks a test as a unittest",
232+
"unit: marks a test as a unit test",
233233
"s3: marks a test as requiring access to s3 compliant storage (use with --aws-access-key-id, --aws-secret-access-key, and --endpoint args)",
234234
"adls: marks a test as requiring access to adls compliant storage (use with --adls.account-name, --adls.account-key, and --adls.endpoint args)",
235235
"integration: marks integration tests against Apache Spark",

‎tests/conftest.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
def pytest_collection_modifyitems(items: list[pytest.Item]) -> None:
111111
for item in items:
112112
if not any(marker.name in NON_UNIT_TEST_MARKERS for marker in item.iter_markers()):
113-
item.add_marker("unmarked")
113+
item.add_marker("unit")
114114

115115

116116
@pytest.fixture(autouse=True, scope="session")

0 commit comments

Comments
 (0)