mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-06 09:41:39 -05:00
build: Use Python 3.8 for backwards compatibility tests
This commit is contained in:
parent
296d14bf6d
commit
ced28e20f8
3 changed files with 13 additions and 13 deletions
|
@ -16,7 +16,7 @@ let
|
|||
poetry2nix = import ./.. { inherit pkgs; inherit poetry; };
|
||||
poetryLib = import ../lib.nix { inherit pkgs; lib = pkgs.lib; stdenv = pkgs.stdenv; };
|
||||
pep425 = pkgs.callPackage ../pep425.nix { inherit poetryLib; python = pkgs.python3; };
|
||||
pep425Python37 = pkgs.callPackage ../pep425.nix { inherit poetryLib; python = pkgs.python3; };
|
||||
pep425PythonOldest = pkgs.callPackage ../pep425.nix { inherit poetryLib; python = pkgs.python38; };
|
||||
pep425OSX = pkgs.callPackage ../pep425.nix { inherit poetryLib; isLinux = false; python = pkgs.python3; };
|
||||
skipTests = builtins.filter (t: builtins.typeOf t != "list") (builtins.split "," (builtins.getEnv "SKIP_TESTS"));
|
||||
callTest = test: attrs: pkgs.callPackage test ({ inherit poetry2nix; } // attrs);
|
||||
|
@ -38,7 +38,7 @@ builtins.removeAttrs
|
|||
override-default = callTest ./override-default-support { };
|
||||
common-pkgs-1 = callTest ./common-pkgs-1 { };
|
||||
common-pkgs-2 = callTest ./common-pkgs-2 { };
|
||||
pep425 = pkgs.callPackage ./pep425 { inherit pep425; inherit pep425OSX; inherit pep425Python37; };
|
||||
pep425 = pkgs.callPackage ./pep425 { inherit pep425; inherit pep425OSX; inherit pep425PythonOldest; };
|
||||
pep600 = skipOSX (callTest ./pep600 { });
|
||||
env = callTest ./env { };
|
||||
pytest-randomly = callTest ./pytest-randomly { };
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
Note: this test assumes that "certifi" lib is going to be a dep of "requests" in the future.
|
||||
*/
|
||||
{ lib, poetry2nix, python3 }:
|
||||
{ lib, poetry2nix, python3, python38 }:
|
||||
let
|
||||
inherit (builtins) elem map;
|
||||
drvPythonCurrent = poetry2nix.mkPoetryPackages {
|
||||
|
@ -12,14 +12,14 @@ let
|
|||
};
|
||||
|
||||
# Test backward compatibility
|
||||
drvPython37 = poetry2nix.mkPoetryPackages {
|
||||
drvPythonOldest = poetry2nix.mkPoetryPackages {
|
||||
projectDir = ./.;
|
||||
python = python3;
|
||||
python = python38;
|
||||
};
|
||||
|
||||
packageNamesCurrent = map (package: package.pname) drvPythonCurrent.poetryPackages;
|
||||
packageNamesPython37 = map (package: package.pname) drvPython37.poetryPackages;
|
||||
packageNamesPythonOldest = map (package: package.pname) drvPythonOldest.poetryPackages;
|
||||
in
|
||||
assert builtins.elem "certifi" packageNamesCurrent;
|
||||
assert builtins.elem "certifi" packageNamesPython37;
|
||||
assert builtins.elem "certifi" packageNamesPythonOldest;
|
||||
drvPythonCurrent
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ writeText, stdenv, lib, pep425, pep425OSX, pep425Python37 }:
|
||||
{ writeText, stdenv, lib, pep425, pep425OSX, pep425PythonOldest }:
|
||||
|
||||
lib.debug.runTests {
|
||||
|
||||
|
@ -30,7 +30,7 @@ lib.debug.runTests {
|
|||
expected = [{ file = "grpcio-1.25.0-cp27-cp27m-macosx_10_10_x86_64.whl"; }];
|
||||
};
|
||||
|
||||
testLinuxPickPython37 =
|
||||
testLinuxPickPythonOldest =
|
||||
let
|
||||
cs = [
|
||||
{ file = "grpcio-1.25.0-cp27-cp27m-macosx_10_10_x86_64.whl"; }
|
||||
|
@ -42,7 +42,7 @@ lib.debug.runTests {
|
|||
];
|
||||
in
|
||||
{
|
||||
expr = (pep425Python37.selectWheel cs);
|
||||
expr = (pep425PythonOldest.selectWheel cs);
|
||||
expected = [{ file = "grpcio-1.25.0-cp37-cp37m-manylinux2010_x86_64.whl"; }];
|
||||
};
|
||||
|
||||
|
@ -174,7 +174,7 @@ lib.debug.runTests {
|
|||
];
|
||||
in
|
||||
{
|
||||
expr = pep425Python37.selectWheel cs;
|
||||
expr = pep425PythonOldest.selectWheel cs;
|
||||
expected = [{ file = "msgpack-0.6.2-cp37-cp37m-manylinux1_x86_64.whl"; }];
|
||||
};
|
||||
|
||||
|
@ -186,7 +186,7 @@ lib.debug.runTests {
|
|||
];
|
||||
in
|
||||
{
|
||||
expr = pep425Python37.selectWheel cs;
|
||||
expr = pep425PythonOldest.selectWheel cs;
|
||||
expected = [{ file = "tensorboard-1.14.0-py3-none-any.whl"; }];
|
||||
};
|
||||
|
||||
|
@ -197,7 +197,7 @@ lib.debug.runTests {
|
|||
];
|
||||
in
|
||||
{
|
||||
expr = pep425Python37.selectWheel cs;
|
||||
expr = pep425PythonOldest.selectWheel cs;
|
||||
expected = [{ file = "tensorboard-1.14.0-py2.py3-none-any.whl"; }];
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue