docs/language-frameworks/python: clarify how to best comment on disabled tests (#415167)

This commit is contained in:
Martin Weinelt 2025-06-09 05:15:37 +02:00 committed by GitHub
commit bf7b973a2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2180,7 +2180,8 @@ The following rules are desired to be respected:
* Make sure the tests are enabled using for example [`pytestCheckHook`](#using-pytestcheckhook) and, in the case of * Make sure the tests are enabled using for example [`pytestCheckHook`](#using-pytestcheckhook) and, in the case of
libraries, are passing for all interpreters. If certain tests fail they can be libraries, are passing for all interpreters. If certain tests fail they can be
disabled individually. Try to avoid disabling the tests altogether. In any disabled individually. Try to avoid disabling the tests altogether. In any
case, when you disable tests, leave a comment explaining why. case, when you disable tests, leave a comment explaining not only _what_ the failure
is but _why_ the test failure can be ignored for safe distribution with nixpkgs.
* `pythonImportsCheck` is set. This is still a good smoke test even if `pytestCheckHook` is set. * `pythonImportsCheck` is set. This is still a good smoke test even if `pytestCheckHook` is set.
* `meta.platforms` takes the default value in many cases. * `meta.platforms` takes the default value in many cases.
It does not need to be set explicitly unless the package requires a specific platform. It does not need to be set explicitly unless the package requires a specific platform.