about summary refs log tree commit diff
path: root/pkgs/development/python-modules/bork/tests.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/bork/tests.nix')
-rw-r--r--pkgs/development/python-modules/bork/tests.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/bork/tests.nix b/pkgs/development/python-modules/bork/tests.nix
new file mode 100644
index 0000000000000..7d5c84f2bc35c
--- /dev/null
+++ b/pkgs/development/python-modules/bork/tests.nix
@@ -0,0 +1,28 @@
+{
+  testers,
+
+  bork,
+  cacert,
+  git,
+  pytest,
+}:
+{
+  # a.k.a. `tests.testers.runCommand.bork`
+  pytest-network = testers.runCommand {
+    name = "bork-pytest-network";
+    nativeBuildInputs = [
+      bork
+      cacert
+      git
+      pytest
+    ];
+    script = ''
+      # Copy the source tree over, and make it writeable
+      cp -r ${bork.src} bork/
+      find -type d -exec chmod 0755 '{}' '+'
+
+      pytest -v -m network bork/
+      touch $out
+    '';
+  };
+}