Skip to content

feat(test): Upgrade pytest to version 9.x - #745

Merged
Tim020 merged 1 commit into
devfrom
feat/upgrade-pytest-to-9
Nov 29, 2025
Merged

feat(test): Upgrade pytest to version 9.x#745
Tim020 merged 1 commit into
devfrom
feat/upgrade-pytest-to-9

Conversation

@Tim020

@Tim020 Tim020 commented Nov 29, 2025

Copy link
Copy Markdown
Contributor

Summary

  • Upgraded pytest from <8.5 to <9.1 to adopt the latest testing framework features
  • Updated pytest-asyncio to >=1.3.0 for pytest 9 compatibility
  • All tests pass successfully with no breaking changes

Motivation

pytest 9.0 was released on November 5, 2025, bringing improvements and bug fixes. This upgrade ensures we stay current with the testing framework and avoid future compatibility issues.

Key Changes

Dependency Previous New
pytest <8.5 <9.1
pytest-asyncio (unpinned) >=1.3.0

Breaking Changes Analysis

After thorough analysis, none of the pytest 9.0 breaking changes affect our codebase:

  • ✅ Python 3.9 dropped - We use Python >=3.13
  • ✅ Test function yields - Our @gen_test decorated tests use Tornado's gen-based coroutines (valid)
  • ✅ Duplicate path arguments - Not relevant to our usage
  • ✅ CI mode detection - May need verification in CI/CD

Testing Results

============================= test session starts ==============================
platform darwin -- Python 3.13.2, pytest-9.0.1, pluggy-1.6.0
collected 31 items

31 passed, 733 warnings in 7.18s
  • ✅ All 31 tests pass
  • ✅ No pytest-specific deprecation warnings
  • ✅ Verified compatibility with:
    • Tornado AsyncHTTPTestCase tests
    • pytest-asyncio async tests
    • pytest fixtures

Note: The 733 warnings are all from SQLAlchemy (unrelated to pytest upgrade)

Test Plan

  • Run full test suite locally
  • Check for pytest deprecation warnings
  • Verify async test compatibility
  • Verify CI/CD pipeline passes
  • Monitor for any edge cases in production use

References

🤖 Generated with Claude Code

Upgraded pytest from <8.5 to <9.1 to adopt the latest testing framework
features and improvements.

Changes:
- Updated pytest requirement from <8.5 to <9.1
- Updated pytest-asyncio to >=1.3.0 for pytest 9 compatibility

Testing:
- All 31 tests pass successfully
- No pytest-specific deprecation warnings detected
- Verified compatibility with existing test suite including:
  - Tornado AsyncHTTPTestCase tests
  - pytest-asyncio async tests
  - pytest fixtures

The upgrade is safe and backward-compatible with our current test patterns.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added server Pull requests changing back end code xsmall-diff labels Nov 29, 2025
@github-actions

Copy link
Copy Markdown

Test Results

31 tests   31 ✅  8s ⏱️
 1 suites   0 💤
 1 files     0 ❌

Results for commit 00f56e9.

@Tim020
Tim020 merged commit fdfdd72 into dev Nov 29, 2025
14 checks passed
@Tim020
Tim020 deleted the feat/upgrade-pytest-to-9 branch November 29, 2025 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

server Pull requests changing back end code xsmall-diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant