Skip to content

Commit e11c967

Browse files
committed
python310Packages.readchar: run tests on Darwin
1 parent 16abcb8 commit e11c967

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

pkgs/development/python-modules/readchar/default.nix

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
, buildPythonPackage
33
, fetchFromGitHub
44

5-
# native
6-
, flake8
7-
85
# tests
96
, pytestCheckHook
107
, pexpect
@@ -26,11 +23,13 @@ buildPythonPackage rec {
2623
postPatch = ''
2724
substituteInPlace setup.cfg \
2825
--replace "--cov=readchar" ""
26+
# run Linux tests on Darwin as well
27+
# see https://github.com/magmax/python-readchar/pull/99 for why this is not upstreamed
28+
substituteInPlace tests/linux/conftest.py \
29+
--replace 'sys.platform.startswith("linux")' 'sys.platform.startswith(("darwin", "linux"))'
2930
'';
3031

31-
nativeBuildInputs = [
32-
flake8
33-
];
32+
pythonImportsCheck = [ "readchar" ];
3433

3534
nativeCheckInputs = [
3635
pytestCheckHook

0 commit comments

Comments
 (0)