about summary refs log tree commit diff
path: root/pkgs/development/python-modules/coconut
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-02-02 09:02:18 +0100
committerFabian Affolter <mail@fabian-affolter.ch>2021-02-02 09:02:18 +0100
commit9c06d17d95d928baac02d4bf862e7404d369660d (patch)
treeb3c8fba64c855957317b771a9c6339ca33ae5668 /pkgs/development/python-modules/coconut
parent44afe6bba161821ad2bb607e267f19565f7b2836 (diff)
python3Packages.coconut: switch to pytestCheckHook
Diffstat (limited to 'pkgs/development/python-modules/coconut')
-rw-r--r--pkgs/development/python-modules/coconut/default.nix44
1 files changed, 24 insertions, 20 deletions
diff --git a/pkgs/development/python-modules/coconut/default.nix b/pkgs/development/python-modules/coconut/default.nix
index b75a82b6c2b21..966546a777587 100644
--- a/pkgs/development/python-modules/coconut/default.nix
+++ b/pkgs/development/python-modules/coconut/default.nix
@@ -1,17 +1,15 @@
-{
-  lib,
-  buildPythonApplication,
-  fetchFromGitHub,
-  fetchpatch,
-
-  cpyparsing,
-  ipykernel,
-  mypy,
-  pygments,
-  pytest,
-  prompt_toolkit,
-  tkinter,
-  watchdog
+{ lib
+, buildPythonApplication
+, fetchFromGitHub
+, fetchpatch
+, cpyparsing
+, ipykernel
+, mypy
+, pygments
+, pytestCheckHook
+, prompt_toolkit
+, tkinter
+, watchdog
 }:
 
 buildPythonApplication rec {
@@ -35,13 +33,19 @@ buildPythonApplication rec {
     })
   ];
 
-  checkInputs = [ pytest tkinter ];
+  checkInputs = [
+    pytestCheckHook
+    tkinter
+  ];
+
   # Currently most tests do not work on Hydra due to external fetches.
-  checkPhase = ''
-    pytest tests/constants_test.py
-    pytest tests/main_test.py::TestShell::test_compile_to_file
-    pytest tests/main_test.py::TestShell::test_convenience
-  '';
+  pytestFlagsArray = [
+    "tests/constants_test.py"
+    "tests/main_test.py::TestShell::test_compile_to_file"
+    "tests/main_test.py::TestShell::test_convenience"
+  ];
+
+  pythonImportsCheck = [ "coconut" ];
 
   meta = with lib; {
     homepage = "http://coconut-lang.org/";