Skip to content

Conversation

@tetienne
Copy link
Collaborator

@tetienne tetienne commented Jan 25, 2026

Summary

Modernizes the test suite with Python best practices:

  • Use is None / is not None for explicit None checks (PEP 8)
  • Use pytest.raises() pattern for exception tests
  • Add ruff per-file-ignores for S101 in tests, removing redundant inline # noqa comments
  • Replace os.path with pathlib.Path in test_client.py
  • Extract shared fixtures (MockResponse, client, local_client) to tests/conftest.py

Test Plan

  • All 129 tests pass
  • Pre-commit checks pass (ruff, mypy, ty)

- Use `is None` / `is not None` for explicit None checks (PEP 8)
- Use `pytest.raises(TypeError, lambda: expr)` for exception tests
- Keep `assert collection` for empty/non-empty checks (Pythonic)
@tetienne tetienne force-pushed the refactor/pythonic-test-assertions branch from 1c9af04 to 25f1d66 Compare January 25, 2026 14:46
@tetienne tetienne marked this pull request as ready for review January 25, 2026 14:47
@tetienne tetienne requested a review from iMicknl as a code owner January 25, 2026 14:47
@tetienne tetienne marked this pull request as draft January 25, 2026 14:48
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.

2 participants