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
, fetchFromGitHub
# native
, flake8
# tests
, pytestCheckHook
, pexpect
@ -26,11 +23,13 @@ buildPythonPackage rec {
postPatch = ''
substituteInPlace setup.cfg \
--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 = [
flake8
];
pythonImportsCheck = [ "readchar" ];
nativeCheckInputs = [
pytestCheckHook