summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2017-09-25 14:00:47 +0100
committerGitHub <noreply@github.com>2017-09-25 14:00:47 +0100
commit9d9a28f0144a70651aa402c8caafc594471e4eba (patch)
tree401c54cfdd2df839b1ccd7be4709e1976afad2c6 /doc
parentffd6cbe3d157212437dd4f99e008c5abe7056525 (diff)
downloadnixpkgs-9d9a28f0144a70651aa402c8caafc594471e4eba.tar
nixpkgs-9d9a28f0144a70651aa402c8caafc594471e4eba.tar.gz
nixpkgs-9d9a28f0144a70651aa402c8caafc594471e4eba.tar.bz2
nixpkgs-9d9a28f0144a70651aa402c8caafc594471e4eba.tar.lz
nixpkgs-9d9a28f0144a70651aa402c8caafc594471e4eba.tar.xz
nixpkgs-9d9a28f0144a70651aa402c8caafc594471e4eba.tar.zst
nixpkgs-9d9a28f0144a70651aa402c8caafc594471e4eba.zip
docs/python: more infos regarding failing tests
Diffstat (limited to 'doc')
-rw-r--r--doc/languages-frameworks/python.md15
1 files changed, 14 insertions, 1 deletions
diff --git a/doc/languages-frameworks/python.md b/doc/languages-frameworks/python.md
index 298da8f9f0d..7bdbbbd903a 100644
--- a/doc/languages-frameworks/python.md
+++ b/doc/languages-frameworks/python.md
@@ -785,7 +785,20 @@ example of such a situation is when `py.test` is used.
 
 #### Common issues
 
-- Non-working tests can often be deselected. In the case of `py.test`: `py.test -k 'not function_name and not other_function'`.
+- Non-working tests can often be deselected. By default `buildPythonPackage` runs `python setup.py test`.
+  Most python modules follows the standard test protocol where the pytest runner can be used instead.
+  `py.test` supports a `-k` parameter to ignore test methods or classes: 
+  
+  ```nix
+  buildPythonPackage {
+    # ...
+    # assumes the tests are located in tests
+    checkInputs = [ pytest ];
+    checkPhase = ''
+      py.test -k 'not function_name and not other_function' tests
+    '';
+  }
+  ```
 - Unicode issues can typically be fixed by including `glibcLocales` in `buildInputs` and exporting `LC_ALL=en_US.utf-8`.
 - Tests that attempt to access `$HOME` can be fixed by using the following work-around before running tests (e.g. `preCheck`): `export HOME=$(mktemp -d)`