Skip to content

Consistently use mut marker for tests that write to the database#290

Merged
PGijsbers merged 2 commits intomainfrom
mut-marker
Mar 25, 2026
Merged

Consistently use mut marker for tests that write to the database#290
PGijsbers merged 2 commits intomainfrom
mut-marker

Conversation

@PGijsbers
Copy link
Copy Markdown
Contributor

Even within a transaction, as some requests may stall until transactions with write requests are committed/aborted.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 25, 2026

Walkthrough

This change updates pytest markers across several test modules. The @pytest.mark.mut marker was added to tests in:

  • tests/routers/openml/dataset_tag_test.py (3 tests)
  • tests/routers/openml/datasets_test.py (1 test)
  • tests/routers/openml/migration/datasets_migration_test.py (1 test)
  • tests/routers/openml/migration/setups_migration_test.py (3 tests)
  • tests/routers/openml/qualities_test.py (1 test)
  • tests/routers/openml/study_test.py (5 tests)

The @pytest.mark.mut marker was removed from one test in tests/routers/openml/migration/flows_migration_test.py. No test logic, assertions, parameterization, or public/exported entities were modified. Total changes are additive/removal of decorators only.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding mut markers to tests that write to the database for consistent handling across the test suite.
Description check ✅ Passed The description explains the rationale for the change (preventing request stalls in transactions with write operations), which relates to the changeset's purpose of marking database-write tests.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mut-marker

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@tests/routers/openml/study_test.py`:
- Line 461: The test module uses the `@pytest.mark.mut` decorator but never
imports pytest, causing NameError during collection; add a top-level import for
pytest (i.e., import pytest) in the same test file that contains the
`@pytest.mark.mut` usages so the decorator resolves (search for occurrences of
`@pytest.mark.mut` to locate the affected module).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 71e844be-d238-43b4-b13c-4ee032635c4b

📥 Commits

Reviewing files that changed from the base of the PR and between f77c4a8 and 00675ab.

📒 Files selected for processing (7)
  • tests/routers/openml/dataset_tag_test.py
  • tests/routers/openml/datasets_test.py
  • tests/routers/openml/migration/datasets_migration_test.py
  • tests/routers/openml/migration/flows_migration_test.py
  • tests/routers/openml/migration/setups_migration_test.py
  • tests/routers/openml/qualities_test.py
  • tests/routers/openml/study_test.py
💤 Files with no reviewable changes (1)
  • tests/routers/openml/migration/flows_migration_test.py

Comment thread tests/routers/openml/study_test.py
@PGijsbers PGijsbers merged commit 3dd3b33 into main Mar 25, 2026
2 checks passed
@PGijsbers PGijsbers deleted the mut-marker branch March 25, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant