aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2020-11-30 19:13:16 -0800
committerFrederik Rietdijk <fridh@fridh.nl>2020-12-01 14:44:26 +0100
commitdf11a2851cdd027ec7701b9d8ee2225a5a2ab28d (patch)
tree6837fc3f67e1e8195719fb7034d96cf6d655ec27
parent9a885384da1d6a3a5423605a467392347628ecf3 (diff)
python3Packages.faker: fix tests, remove random2
-rw-r--r--pkgs/development/python-modules/faker/default.nix29
1 files changed, 17 insertions, 12 deletions
diff --git a/pkgs/development/python-modules/faker/default.nix b/pkgs/development/python-modules/faker/default.nix
index 4fc505ff67af..abdb0f583941 100644
--- a/pkgs/development/python-modules/faker/default.nix
+++ b/pkgs/development/python-modules/faker/default.nix
@@ -1,15 +1,15 @@
{ lib, buildPythonPackage, fetchPypi, pythonOlder,
- # Build inputs
- dateutil, six, text-unidecode, ipaddress ? null
- # Test inputs
- , email_validator
- , freezegun
- , mock
- , more-itertools
- , pytest
- , pytestrunner
- , ukpostcodeparser
- , validators
+# Build inputs
+dateutil, six, text-unidecode, ipaddress ? null
+# Test inputs
+, email_validator
+, freezegun
+, mock
+, more-itertools
+, pytestCheckHook
+, pytestrunner
+, ukpostcodeparser
+, validators
}:
assert pythonOlder "3.3" -> ipaddress != null;
@@ -27,13 +27,18 @@ buildPythonPackage rec {
checkInputs = [
email_validator
freezegun
- pytest
+ pytestCheckHook
ukpostcodeparser
validators
]
++ lib.optionals (pythonOlder "3.3") [ mock ]
++ lib.optionals (pythonOlder "3.0") [ more-itertools ];
+ # avoid tests which import random2, an abandoned library
+ pytestFlagsArray = [
+ "--ignore=tests/providers/test_ssn.py"
+ ];
+
propagatedBuildInputs = [
dateutil
six