mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-30 01:17:28 +03:00
python3.pkgs.build: move tests to passthru
While build is built using bootstrap packages, none of its test dependencies should be, so we must move out of the derivation.
This commit is contained in:
parent
349f57fb42
commit
e1cafe642a
@ -1,5 +1,6 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, build
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, flit-core
|
||||
@ -41,36 +42,52 @@ buildPythonPackage rec {
|
||||
tomli
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
filelock
|
||||
pytest-mock
|
||||
pytest-rerunfailures
|
||||
pytest-xdist
|
||||
pytestCheckHook
|
||||
setuptools
|
||||
toml
|
||||
];
|
||||
# We need to disable tests because this package is part of the bootstrap chain
|
||||
# and its test dependencies cannot be built yet when this is being built.
|
||||
doCheck = false;
|
||||
|
||||
pytestFlagsArray = [
|
||||
"-W"
|
||||
"ignore::DeprecationWarning"
|
||||
];
|
||||
passthru.tests = {
|
||||
pytest = buildPythonPackage {
|
||||
pname = "${pname}-pytest";
|
||||
inherit version;
|
||||
format = "other";
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
dontBuild = true;
|
||||
dontInstall = true;
|
||||
|
||||
disabledTests = [
|
||||
# Tests often fail with StopIteration
|
||||
"test_isolat"
|
||||
"test_default_pip_is_never_too_old"
|
||||
"test_build"
|
||||
"test_with_get_requires"
|
||||
"test_init"
|
||||
"test_output"
|
||||
"test_wheel_metadata"
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
# Expects Apple's Python and its quirks
|
||||
"test_can_get_venv_paths_with_conflicting_default_scheme"
|
||||
];
|
||||
nativeCheckInputs = [
|
||||
build
|
||||
filelock
|
||||
pytest-mock
|
||||
pytest-rerunfailures
|
||||
pytest-xdist
|
||||
pytestCheckHook
|
||||
setuptools
|
||||
toml
|
||||
];
|
||||
|
||||
pytestFlagsArray = [
|
||||
"-W"
|
||||
"ignore::DeprecationWarning"
|
||||
];
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
disabledTests = [
|
||||
# Tests often fail with StopIteration
|
||||
"test_isolat"
|
||||
"test_default_pip_is_never_too_old"
|
||||
"test_build"
|
||||
"test_with_get_requires"
|
||||
"test_init"
|
||||
"test_output"
|
||||
"test_wheel_metadata"
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
# Expects Apple's Python and its quirks
|
||||
"test_can_get_venv_paths_with_conflicting_default_scheme"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
pythonImportsCheck = [
|
||||
"build"
|
||||
|
Loading…
Reference in New Issue
Block a user