about summary refs log tree commit diff
path: root/users/Profpatsch/writers/tests.nix
blob: 4cae230e0e6d153456a9b74a5061f3ca2a52762c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ depot, pkgs, python3Lib }:

let
  testLib = python3Lib {
    name = "test_lib";
  } ''
    def test():
      return "test"
  '';

  pythonWithLib = pkgs.writers.writePython3 "python-with-lib" {
    libraries = [ testLib ];
  } ''
    import test_lib

    assert(test_lib.test() == "test")
  '';

in {
  inherit
    pythonWithLib;
}