about summary refs log tree commit diff
path: root/doc/languages-frameworks/python.section.md
diff options
context:
space:
mode:
authorWinter <winter@winter.cafe>2022-08-06 12:31:53 -0400
committerWinter <winter@winter.cafe>2022-08-13 14:09:43 -0400
commite8fbb38a51380fe6e56351b5750dddcccff79c4c (patch)
treedc44893b7aafd2ed43f7c5ad3f550091211fe355 /doc/languages-frameworks/python.section.md
parenta5a853e4465f7e1d25e54fa8981bff20e99d380c (diff)
downloadnixlib-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.md11
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}