Skip to content

Commit

Permalink
Add test for python-inconsistent-interpreters
Browse files Browse the repository at this point in the history
  • Loading branch information
rmcgibbo committed Jan 24, 2021
1 parent 6db5fbb commit bcefb64
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 0 deletions.
11 changes: 11 additions & 0 deletions run-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,17 @@ def __iter__(self):
]
)

yield make_test_rule(
'python-inconsistent-interpreters',
[
'mixed-1',
'mixed-2',
],
[
'normal',
]
)

yield make_test_rule(
'unnecessary-parallel-building',
[
Expand Down
1 change: 1 addition & 0 deletions tests/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
python-explicit-check-phase = pkgs.python3.pkgs.callPackage ./python-explicit-check-phase { };
python-imports-check-typo = pkgs.python3.pkgs.callPackage ./python-imports-check-typo { };
python-include-tests = pkgs.python3.pkgs.callPackage ./python-include-tests { };
python-inconsistent-interpreters = pkgs.python3.pkgs.callPackage ./python-inconsistent-interpreters { };
unclear-gpl = pkgs.callPackage ./unclear-gpl { };
unnecessary-parallel-building = pkgs.callPackage ./unnecessary-parallel-building { };
}
11 changes: 11 additions & 0 deletions tests/python-inconsistent-interpreters/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{ callPackage
}:

{
# positive cases
mixed-1 = callPackage ./mixed-1.nix { };
mixed-2 = callPackage ./mixed-2.nix { };

# negative cases
normal = callPackage ./normal.nix { };
}
11 changes: 11 additions & 0 deletions tests/python-inconsistent-interpreters/mixed-1.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{ buildPythonPackage
, python37Packages
, python39Packages
}:

buildPythonPackage rec {
pname = "package";

propagatedBuildInputs = [ python37Packages.numpy python39Packages.scipy ];
}

10 changes: 10 additions & 0 deletions tests/python-inconsistent-interpreters/mixed-2.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{ buildPythonPackage
, python27Packages
}:

buildPythonPackage rec {
pname = "package";

checkInputs = [ python27Packages.numpy ];
}

11 changes: 11 additions & 0 deletions tests/python-inconsistent-interpreters/normal.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{ buildPythonPackage
, numpy
, scipy
}:

buildPythonPackage rec {
pname = "package";

propagatedBuildInputs = [ numpy scipy ];
}

0 comments on commit bcefb64

Please sign in to comment.