summary refs log tree commit diff
path: root/pkgs/development/python-modules/pytest-cram
diff options
context:
space:
mode:
authorJaakko Luttinen <jaakko.luttinen@iki.fi>2017-05-07 14:04:55 +0300
committerJaakko Luttinen <jaakko.luttinen@iki.fi>2017-05-08 11:30:06 +0300
commitf303480f1f8d9febc0d1bba16f28fa34580805d2 (patch)
treee93744a556111fd799cb7a3503646b5ace01265f /pkgs/development/python-modules/pytest-cram
parent4a89ab35eef00098a7edc1c0ffa990929e14ba57 (diff)
downloadnixpkgs-f303480f1f8d9febc0d1bba16f28fa34580805d2.tar
nixpkgs-f303480f1f8d9febc0d1bba16f28fa34580805d2.tar.gz
nixpkgs-f303480f1f8d9febc0d1bba16f28fa34580805d2.tar.bz2
nixpkgs-f303480f1f8d9febc0d1bba16f28fa34580805d2.tar.lz
nixpkgs-f303480f1f8d9febc0d1bba16f28fa34580805d2.tar.xz
nixpkgs-f303480f1f8d9febc0d1bba16f28fa34580805d2.tar.zst
nixpkgs-f303480f1f8d9febc0d1bba16f28fa34580805d2.zip
pythonPackages.pytest-cram: init at 0.1.1
Diffstat (limited to 'pkgs/development/python-modules/pytest-cram')
-rw-r--r--pkgs/development/python-modules/pytest-cram/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pytest-cram/default.nix b/pkgs/development/python-modules/pytest-cram/default.nix
new file mode 100644
index 00000000000..fdd2b2316e2
--- /dev/null
+++ b/pkgs/development/python-modules/pytest-cram/default.nix
@@ -0,0 +1,34 @@
+{lib, buildPythonPackage, fetchPypi, pytest, cram, bash, writeText}:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  version = "0.1.1";
+  pname = "pytest-cram";
+
+  buildInputs = [ pytest ];
+  propagatedBuildInputs = [ cram ];
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0ad05999iqzyjay9y5lc0cnd3jv8qxqlzsvxzp76shslmhrv0c4f";
+  };
+
+  postPatch = ''
+    substituteInPlace pytest_cram/tests/test_options.py \
+      --replace "/bin/bash" "${bash}/bin/bash"
+  '';
+
+  # Remove __init__.py from tests folder, otherwise pytest raises an error that
+  # the imported and collected modules are different.
+  checkPhase = ''
+    rm pytest_cram/tests/__init__.py
+    pytest pytest_cram
+  '';
+
+  meta = {
+    description = "Test command-line applications with pytest and cram";
+    homepage = https://github.com/tbekolay/pytest-cram;
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ jluttine ];
+  };
+}