Merge pull request #217970 from dotlambda/readchar-darwin

python310Packages.readchar: run tests on Darwin
This commit is contained in:
Martin Weinelt 2023-02-26 23:29:02 +00:00 committed by GitHub
commit 2a1538d398
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,9 +2,6 @@
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
# native
, flake8
# tests # tests
, pytestCheckHook , pytestCheckHook
, pexpect , pexpect
@ -26,11 +23,13 @@ buildPythonPackage rec {
postPatch = '' postPatch = ''
substituteInPlace setup.cfg \ substituteInPlace setup.cfg \
--replace "--cov=readchar" "" --replace "--cov=readchar" ""
# run Linux tests on Darwin as well
# see https://github.com/magmax/python-readchar/pull/99 for why this is not upstreamed
substituteInPlace tests/linux/conftest.py \
--replace 'sys.platform.startswith("linux")' 'sys.platform.startswith(("darwin", "linux"))'
''; '';
nativeBuildInputs = [ pythonImportsCheck = [ "readchar" ];
flake8
];
nativeCheckInputs = [ nativeCheckInputs = [
pytestCheckHook pytestCheckHook