Skip to content

Conversation

jherland
Copy link
Member

Various small bits and bobs collected over the last weeks. The last commit will allow the nixpkgs addition of FawltyDeps to skip tests that need network access in a cleaner way.

Commits:

  • Add @layus as author and co-maintainer
  • Update locked deps with poetry update
  • Adjustments due to new ruff version
  • Add "needs_network" pytest mark to tests using local_pypi fixture

jherland added 4 commits June 13, 2025 12:03
These popped up with the upgrade from ruff 0.11 to 0.12.
NixOS/nixpkgs#420483 is adding FawltyDeps to
nixpkgs, but needs a way to disable tests that need network access.

Although we have tried to isolate such tests with the "integration"
mark, we have not been entirely successful: The local_pypi fixture
isolates us from contacting PyPI directly, but it does so by setting up
a local PyPI index with some pre-populated packages. These packages are
grabbed from the pytest cache, but when that cache is missing, they are
ultimately downloaded from PyPI's CDN (see tests/python_packages.toml
and TarballPackage in tests/project_helpers.py for the details).

Use a trick from pytest-dev/pytest#1368 to
automatically mark all tests using the local_pypi fixture with a new
"needs_network" pytest mark. This will allow the nixpkgs expression for
FawltyDeps to more easily skip tests that need network access.
@jherland jherland self-assigned this Jun 30, 2025
@jherland jherland merged commit 6b57917 into main Jul 1, 2025
60 checks passed
@jherland jherland deleted the jherland/administrivia branch July 1, 2025 13:01
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