about summary refs log tree commit diff
path: root/users/Profpatsch/writers/tests.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/Profpatsch/writers/tests.nix')
-rw-r--r--users/Profpatsch/writers/tests.nix19
1 files changed, 14 insertions, 5 deletions
diff --git a/users/Profpatsch/writers/tests.nix b/users/Profpatsch/writers/tests.nix
index 4cae230e0e6d..13ddfd10e976 100644
--- a/users/Profpatsch/writers/tests.nix
+++ b/users/Profpatsch/writers/tests.nix
@@ -1,19 +1,28 @@
-{ depot, pkgs, python3Lib }:
+{ depot, pkgs, python3, python3Lib }:
 
 let
+  transitiveLib = python3Lib {
+    name = "transitive";
+  } ''
+    def transitive(s):
+      return s + " 1 2 3"
+  '';
+
   testLib = python3Lib {
     name = "test_lib";
+    libraries = _: [ transitiveLib ];
   } ''
+    import transitive
     def test():
-      return "test"
+      return transitive.transitive("test")
   '';
 
-  pythonWithLib = pkgs.writers.writePython3 "python-with-lib" {
-    libraries = [ testLib ];
+  pythonWithLib = python3 "python-with-lib" {
+    libraries = _: [ testLib ];
   } ''
     import test_lib
 
-    assert(test_lib.test() == "test")
+    assert(test_lib.test() == "test 1 2 3")
   '';
 
 in {