about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPjotr Prins2026-04-05 10:49:40 +0200
committerPjotr Prins2026-04-05 10:49:40 +0200
commit867e2a6c1d99f503ef388c2417bfffaa83de7754 (patch)
treee16a65e1c19574fec88efa68ce5bd8f6296b0306
parent210a4895f41094b594b8e34a48d3173b07e12184 (diff)
downloadgenecup-867e2a6c1d99f503ef388c2417bfffaa83de7754.tar.gz
Add test framework
-rw-r--r--guix.scm5
-rw-r--r--tests/test_hello.py8
2 files changed, 12 insertions, 1 deletions
diff --git a/guix.scm b/guix.scm
index 7c58143..a67e737 100644
--- a/guix.scm
+++ b/guix.scm
@@ -333,7 +333,7 @@ access to Gemini models.")
     (build-system python-build-system)
     (arguments
      (list
-      #:tests? #f ; no test suite
+      #:tests? #t
       #:phases
       #~(modify-phases %standard-phases
           (delete 'configure)
@@ -362,6 +362,9 @@ access to Gemini models.")
                 ;; Patch default pubmed path to store location
                 (substitute* "more_functions.py"
                   (("\\./minipubmed") pubmed)))))
+          (replace 'check
+            (lambda _
+              (invoke "python" "-m" "unittest" "discover" "-s" "tests" "-v")))
           (replace 'install
             (lambda* (#:key outputs #:allow-other-keys)
               (let ((out (assoc-ref outputs "out")))
diff --git a/tests/test_hello.py b/tests/test_hello.py
new file mode 100644
index 0000000..2af3f3b
--- /dev/null
+++ b/tests/test_hello.py
@@ -0,0 +1,8 @@
+import unittest
+
+class TestHello(unittest.TestCase):
+    def test_hello(self):
+        self.assertEqual("hello", "hello")
+
+if __name__ == "__main__":
+    unittest.main()