xml2rfc
xml2rfc copied to clipboard
Please mark all pytests that require network access with @pytest.mark.network
Description
This is a follow up on https://github.com/ietf-tools/xml2rfc/issues/561.
I am currently working on packaging xml2rfc for Gentoo. Since Gentoo is a source-based distribution, it is able to run the packages test suite (if this feature is enabled). However Gentoo's package manager will run the test suit in a sandboxed environment, which means there will be no network access. Since most test suites are either pure unit test, or have different suites for unit and integration tests (the latter often requiring network, the format not), the sandboxed environment is usually not an issue.
However, it sometimes becomes an issue when projects have unit tests that require network access. Due to #561 the 'tests-no-network' Makefile target was added to xml2rfc. Unfortunately, this turned out to be insufficient. The idiomatic solution, it seems, is to use pytest markers. Hence, please consider marking all pytests that require network access with @pytest.mark.network, as it allows me to deselect those tests using pytest -m "not network" in the src_test() phase of the Gentoo ebuild of xml2rfc. Thanks.
Downstream issue: https://bugs.gentoo.org/878755
Code of Conduct
- [X] I agree to follow the IETF's Code of Conduct