aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/python-modules/pytest
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pytest')
-rw-r--r--nixpkgs/pkgs/development/python-modules/pytest/4.nix4
-rw-r--r--nixpkgs/pkgs/development/python-modules/pytest/5.nix80
-rw-r--r--nixpkgs/pkgs/development/python-modules/pytest/default.nix31
3 files changed, 104 insertions, 11 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pytest/4.nix b/nixpkgs/pkgs/development/python-modules/pytest/4.nix
index 4fe588f6456..43cfe6c822c 100644
--- a/nixpkgs/pkgs/development/python-modules/pytest/4.nix
+++ b/nixpkgs/pkgs/development/python-modules/pytest/4.nix
@@ -3,12 +3,12 @@
, atomicwrites, mock, writeText, pathlib2, wcwidth, packaging, isPyPy
}:
buildPythonPackage rec {
- version = "4.6.9";
+ version = "4.6.11";
pname = "pytest";
src = fetchPypi {
inherit pname version;
- sha256 = "0fgkmpc31nzy97fxfrkqbzycigdwxwwmninx3qhkzp81migggs0r";
+ sha256 = "50fa82392f2120cc3ec2ca0a75ee615be4c479e66669789771f1758332be4353";
};
checkInputs = [ hypothesis mock ];
diff --git a/nixpkgs/pkgs/development/python-modules/pytest/5.nix b/nixpkgs/pkgs/development/python-modules/pytest/5.nix
new file mode 100644
index 00000000000..2b45c330cf3
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/pytest/5.nix
@@ -0,0 +1,80 @@
+{ stdenv, buildPythonPackage, pythonOlder, fetchPypi, isPy3k, isPyPy
+, atomicwrites
+, attrs
+, funcsigs
+, hypothesis
+, mock
+, more-itertools
+, packaging
+, pathlib2
+, pluggy
+, py
+, pygments
+, python
+, setuptools
+, setuptools_scm
+, six
+, toml
+, wcwidth
+, writeText
+}:
+
+buildPythonPackage rec {
+ version = "5.4.3";
+ pname = "pytest";
+
+ disabled = !isPy3k;
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "1n67lk8iwlsmfdm8663k8l7isllg1xd3n9p1yla7885szhdk6ybr";
+ };
+
+ checkInputs = [ hypothesis pygments ];
+ nativeBuildInputs = [ setuptools_scm ];
+ propagatedBuildInputs = [
+ atomicwrites
+ attrs
+ more-itertools
+ packaging
+ pluggy
+ py
+ setuptools
+ six
+ toml
+ wcwidth
+ ] ++ stdenv.lib.optionals (pythonOlder "3.6") [ pathlib2 ];
+
+ doCheck = !isPyPy; # https://github.com/pytest-dev/pytest/issues/3460
+
+ preCheck = ''
+ # don't test bash builtins
+ rm testing/test_argcomplete.py
+ '';
+
+ # Ignored file https://github.com/pytest-dev/pytest/pull/5605#issuecomment-522243929
+ checkPhase = ''
+ runHook preCheck
+ $out/bin/py.test -x testing/ -k "not test_collect_pyargs_with_testpaths" --ignore=testing/test_junitxml.py
+ runHook postCheck
+ '';
+
+ # Remove .pytest_cache when using py.test in a Nix build
+ setupHook = writeText "pytest-hook" ''
+ pytestcachePhase() {
+ find $out -name .pytest_cache -type d -exec rm -rf {} +
+ }
+ preDistPhases+=" pytestcachePhase"
+ '';
+
+ pythonImportsCheck = [
+ "pytest"
+ ];
+
+ meta = with stdenv.lib; {
+ homepage = "https://docs.pytest.org";
+ description = "Framework for writing tests";
+ maintainers = with maintainers; [ domenkozar lovek323 madjar lsix ];
+ license = licenses.mit;
+ };
+}
diff --git a/nixpkgs/pkgs/development/python-modules/pytest/default.nix b/nixpkgs/pkgs/development/python-modules/pytest/default.nix
index 9e0cd88cf0a..ce742d65ba2 100644
--- a/nixpkgs/pkgs/development/python-modules/pytest/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/pytest/default.nix
@@ -3,6 +3,7 @@
, attrs
, funcsigs
, hypothesis
+, iniconfig
, mock
, more-itertools
, packaging
@@ -14,33 +15,45 @@
, setuptools
, setuptools_scm
, six
+, toml
, wcwidth
, writeText
}:
buildPythonPackage rec {
- version = "5.4.2";
+ version = "6.0.1";
pname = "pytest";
disabled = !isPy3k;
- preCheck = ''
- # don't test bash builtins
- rm testing/test_argcomplete.py
- '';
-
src = fetchPypi {
inherit pname version;
- sha256 = "eb2b5e935f6a019317e455b6da83dd8650ac9ffd2ee73a7b657a30873d67a698";
+ sha256 = "85228d75db9f45e06e57ef9bf4429267f81ac7c0d742cc9ed63d09886a9fe6f4";
};
checkInputs = [ hypothesis pygments ];
nativeBuildInputs = [ setuptools_scm ];
- propagatedBuildInputs = [ attrs py setuptools six pluggy more-itertools atomicwrites wcwidth packaging ]
- ++ stdenv.lib.optionals (pythonOlder "3.6") [ pathlib2 ];
+ propagatedBuildInputs = [
+ atomicwrites
+ attrs
+ iniconfig
+ more-itertools
+ packaging
+ pluggy
+ py
+ setuptools
+ six
+ toml
+ wcwidth
+ ] ++ stdenv.lib.optionals (pythonOlder "3.6") [ pathlib2 ];
doCheck = !isPyPy; # https://github.com/pytest-dev/pytest/issues/3460
+ preCheck = ''
+ # don't test bash builtins
+ rm testing/test_argcomplete.py
+ '';
+
# Ignored file https://github.com/pytest-dev/pytest/pull/5605#issuecomment-522243929
checkPhase = ''
runHook preCheck