diff options
author | Winter <winter@winter.cafe> | 2022-08-06 12:31:53 -0400 |
---|---|---|
committer | Winter <winter@winter.cafe> | 2022-08-13 14:09:43 -0400 |
commit | e8fbb38a51380fe6e56351b5750dddcccff79c4c (patch) | |
tree | dc44893b7aafd2ed43f7c5ad3f550091211fe355 /doc/languages-frameworks/python.section.md | |
parent | a5a853e4465f7e1d25e54fa8981bff20e99d380c (diff) | |
download | nixlib-e8fbb38a51380fe6e56351b5750dddcccff79c4c.tar nixlib-e8fbb38a51380fe6e56351b5750dddcccff79c4c.tar.gz nixlib-e8fbb38a51380fe6e56351b5750dddcccff79c4c.tar.bz2 nixlib-e8fbb38a51380fe6e56351b5750dddcccff79c4c.tar.lz nixlib-e8fbb38a51380fe6e56351b5750dddcccff79c4c.tar.xz nixlib-e8fbb38a51380fe6e56351b5750dddcccff79c4c.tar.zst nixlib-e8fbb38a51380fe6e56351b5750dddcccff79c4c.zip |
pythonPackages.unittestCheckHook: init
Diffstat (limited to 'doc/languages-frameworks/python.section.md')
-rw-r--r-- | doc/languages-frameworks/python.section.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md index 7fb8ba2e7c27..8de523e89dfd 100644 --- a/doc/languages-frameworks/python.section.md +++ b/doc/languages-frameworks/python.section.md @@ -734,6 +734,16 @@ work in any of the formats supported by `buildPythonPackage` currently, with the exception of `other` (see `format` in [`buildPythonPackage` parameters](#buildpythonpackage-parameters) for more details). +### Using unittestCheckHook {#using-unittestcheckhook} + +`unittestCheckHook` is a hook which will substitute the setuptools `test` command for a `checkPhase` which runs `python -m unittest discover`: + +``` + checkInputs = [ unittestCheckHook ]; + + unittestFlags = [ "-s" "tests" "-v" ]; +``` + ### Develop local package {#develop-local-package} As a Python developer you're likely aware of [development mode](http://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode) @@ -1270,6 +1280,7 @@ are used in `buildPythonPackage`. with the `pipInstallHook`. - `pythonRelaxDepsHook` will relax Python dependencies restrictions for the package. See [example usage](#using-pythonrelaxdepshook). +- `unittestCheckHook` will run tests with `python -m unittest discover`. See [example usage](#using-unittestcheckhook). ### Development mode {#development-mode} |