From 867e2a6c1d99f503ef388c2417bfffaa83de7754 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sun, 5 Apr 2026 10:49:40 +0200 Subject: Add test framework --- guix.scm | 5 ++++- tests/test_hello.py | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 tests/test_hello.py 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() -- cgit 1.4.1