Skip to content

Fix 13 pytest warnings by registering timeout marker and removing inv…#448

Merged
kimocoder merged 1 commit into
masterfrom
claude/fix-pytest-warnings-e1wey
Mar 6, 2026
Merged

Fix 13 pytest warnings by registering timeout marker and removing inv…#448
kimocoder merged 1 commit into
masterfrom
claude/fix-pytest-warnings-e1wey

Conversation

@kimocoder

Copy link
Copy Markdown
Owner

…alid config

Remove the timeout = 30 config option (requires pytest-timeout plugin to be installed) and register the timeout marker to eliminate PytestUnknownMarkWarning across all test files.

…alid config

Remove the `timeout = 30` config option (requires pytest-timeout plugin to be
installed) and register the `timeout` marker to eliminate PytestUnknownMarkWarning
across all test files.

https://claude.ai/code/session_015dvuwK9VyLDZ2FZNcV1Pbn
Copilot AI review requested due to automatic review settings March 6, 2026 00:13
@kimocoder kimocoder merged commit 274e721 into master Mar 6, 2026
8 of 9 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates pytest configuration to eliminate warnings related to the timeout marker/config when pytest-timeout isn’t present, by removing an unrecognized ini option and explicitly registering the marker used throughout the test suite.

Changes:

  • Removed timeout = 30 from [tool.pytest.ini_options] (avoids unknown ini option warnings when pytest-timeout is not installed).
  • Registered the timeout marker in pytest ini options to avoid PytestUnknownMarkWarning for @pytest.mark.timeout(...).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyproject.toml
timeout = 30
markers = [
"timeout(seconds): set a timeout for the test (requires pytest-timeout)",
]

Copilot AI Mar 6, 2026

Copy link

Choose a reason for hiding this comment

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

Removing the global timeout = 30 ini option changes test behavior: any test file that does not set @pytest.mark.timeout (most files in tests/ currently don’t) will no longer have a safety timeout and could hang indefinitely. If the intent is to keep a default timeout while eliminating warnings, consider enforcing/ensuring pytest-timeout is installed for test runs (e.g., via required_plugins) and keep the ini option, or add a global timeout mark via tests/conftest.py/common pytest configuration so all tests remain bounded.

Suggested change
]
]
timeout = 30
required_plugins = ["pytest-timeout"]

Copilot uses AI. Check for mistakes.
@kimocoder kimocoder deleted the claude/fix-pytest-warnings-e1wey branch March 6, 2026 02:56
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.

3 participants