+52
-17
pkgs/development/python-modules/nplusone/default.nix
+52
-17
pkgs/development/python-modules/nplusone/default.nix
···
1
-
{ blinker, buildPythonPackage, fetchFromGitHub, lib, isPy27, six, mock, pytest
2
-
, webtest, pytest-cov, pytest-django, pytest-pythonpath, flake8, sqlalchemy
3
-
, flask_sqlalchemy, peewee }:
1
+
{ lib
2
+
, blinker
3
+
, buildPythonPackage
4
+
, fetchFromGitHub
5
+
, flake8
6
+
, flask_sqlalchemy
7
+
, isPy27
8
+
, mock
9
+
, peewee
10
+
, pytest-django
11
+
, pytest-pythonpath
12
+
, pytestCheckHook
13
+
, six
14
+
, sqlalchemy
15
+
, webtest
16
+
}:
4
17
5
18
buildPythonPackage rec {
6
19
pname = "nplusone";
···
14
27
sha256 = "0qdwpvvg7dzmksz3vqkvb27n52lq5sa8i06m7idnj5xk2dgjkdxg";
15
28
};
16
29
30
+
propagatedBuildInputs = [
31
+
blinker
32
+
six
33
+
];
34
+
35
+
checkInputs = [
36
+
flake8
37
+
flask_sqlalchemy
38
+
mock
39
+
peewee
40
+
pytest-django
41
+
pytest-pythonpath
42
+
pytestCheckHook
43
+
sqlalchemy
44
+
webtest
45
+
];
46
+
17
47
# The tests assume the source code is in an nplusone/ directory. When using
18
48
# the Nix sandbox, it will be in a source/ directory instead, making the
19
49
# tests fail.
···
22
52
--replace nplusone/tests/conftest source/tests/conftest
23
53
'';
24
54
25
-
checkPhase = ''
26
-
pytest tests/
55
+
postPatch = ''
56
+
substituteInPlace pytest.ini \
57
+
--replace "--cov nplusone --cov-report term-missing" ""
27
58
'';
28
59
29
-
propagatedBuildInputs = [ six blinker ];
30
-
checkInputs = [
31
-
mock
32
-
pytest
33
-
webtest
34
-
pytest-cov
35
-
pytest-django
36
-
pytest-pythonpath
37
-
flake8
38
-
sqlalchemy
39
-
flask_sqlalchemy
40
-
peewee
60
+
disabledTests = [
61
+
# Tests are out-dated
62
+
"test_many_to_one"
63
+
"test_many_to_many"
64
+
"test_eager_join"
65
+
"test_eager_subquery"
66
+
"test_eager_subquery_unused"
67
+
"test_many_to_many_raise"
68
+
"test_many_to_many_whitelist_decoy"
69
+
"test_many_to_one_subquery"
70
+
"test_many_to_one_reverse_subquery"
71
+
"test_many_to_many_subquery"
72
+
"test_many_to_many_reverse_subquery"
73
+
"test_profile"
41
74
];
75
+
76
+
pythonImportsCheck = [ "nplusone" ];
42
77
43
78
meta = with lib; {
44
79
description = "Detecting the n+1 queries problem in Python";