python3Packages.apipkg: disable several tests
This commit is contained in:
parent
2c8ed5fd7d
commit
0cae5859c2
|
@ -1,5 +1,5 @@
|
||||||
{ stdenv, buildPythonPackage, fetchPypi
|
{ stdenv, buildPythonPackage, fetchPypi
|
||||||
, pytest, setuptools_scm }:
|
, pytest, setuptools_scm, isPy3k }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "apipkg";
|
pname = "apipkg";
|
||||||
|
@ -19,8 +19,18 @@ buildPythonPackage rec {
|
||||||
--replace "py.test.ensuretemp('test_apipkg')" "py.path.local('test_apipkg')"
|
--replace "py.test.ensuretemp('test_apipkg')" "py.path.local('test_apipkg')"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkPhase = ''
|
# Failing tests on Python 3
|
||||||
py.test
|
# https://github.com/pytest-dev/apipkg/issues/17
|
||||||
|
checkPhase = let
|
||||||
|
disabledTests = stdenv.lib.optionals isPy3k [
|
||||||
|
"test_error_loading_one_element"
|
||||||
|
"test_aliasmodule_proxy_methods"
|
||||||
|
"test_eagerload_on_bython"
|
||||||
|
];
|
||||||
|
testExpression = stdenv.lib.optionalString (disabledTests != [])
|
||||||
|
"-k 'not ${stdenv.lib.concatStringsSep " and not " disabledTests}'";
|
||||||
|
in ''
|
||||||
|
py.test ${testExpression}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
|
Loading…
Reference in New Issue