python310Packages.readchar: run tests on Darwin

This commit is contained in:
Robert Schütz 2023-02-23 21:37:27 -08:00
parent 16abcb815b
commit e11c967d8f

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