Merge pull request #22280 from lsix/pytest_defaults_to_30

python*Packages.pytest: defaults to pytest_30

authored by Frederik Rietdijk and committed by GitHub 18ac28b4 01751a94

+61 -55
+38
pkgs/development/python-modules/hypothesis.nix
··· 1 + { stdenv, buildPythonPackage, fetchFromGitHub, python 2 + , isPy27, enum34 3 + , doCheck ? true, pytest, flake8, flaky 4 + }: 5 + buildPythonPackage rec { 6 + # http://hypothesis.readthedocs.org/en/latest/packaging.html 7 + 8 + # Hypothesis has optional dependencies on the following libraries 9 + # pytz fake_factory django numpy pytest 10 + # If you need these, you can just add them to your environment. 11 + 12 + name = "hypothesis-${version}"; 13 + version = "3.6.0"; 14 + 15 + # Upstream prefers github tarballs 16 + src = fetchFromGitHub { 17 + owner = "HypothesisWorks"; 18 + repo = "hypothesis"; 19 + rev = "${version}"; 20 + sha256 = "0a3r4c8sr9jn7sv419vdzrzfc9sp7zf105f1lgyiwyzi3cgyvcvg"; 21 + }; 22 + 23 + buildInputs = stdenv.lib.optionals doCheck [ pytest flake8 flaky ]; 24 + propagatedBuildInputs = stdenv.lib.optionals isPy27 [ enum34 ]; 25 + 26 + inherit doCheck; 27 + 28 + # https://github.com/DRMacIver/hypothesis/issues/300 29 + checkPhase = '' 30 + ${python.interpreter} -m pytest tests/cover 31 + ''; 32 + 33 + meta = with stdenv.lib; { 34 + description = "A Python library for property based testing"; 35 + homepage = https://github.com/DRMacIver/hypothesis; 36 + license = licenses.mpl20; 37 + }; 38 + }
+1 -1
pkgs/tools/misc/tmuxp/default.nix
··· 16 16 ''; 17 17 18 18 buildInputs = with pythonPackages; [ 19 - pytest 19 + pytest_29 20 20 pytest-rerunfailures 21 21 ]; 22 22
+22 -54
pkgs/top-level/python-packages.nix
··· 896 896 sha256 = "1ybywzkd840v1qvb1p2bs08js260vq1jscjg8182hv7bmwacqy0k"; 897 897 }; 898 898 899 - buildInputs = with self; [ pytest_30 case ]; 899 + buildInputs = with self; [ pytest case ]; 900 900 propagatedBuildInputs = with self; [ vine ]; 901 901 902 902 meta = { ··· 2670 2670 sha256 = "1anw68rkja1dbgvndxz5mq6f89hmxwaha0fjcdnsl5j1wj7imc1y"; 2671 2671 }; 2672 2672 2673 - buildInputs = with self; [ pytest_30 case ]; 2673 + buildInputs = with self; [ pytest case ]; 2674 2674 2675 2675 meta = { 2676 2676 homepage = https://github.com/celery/billiard; ··· 3586 3586 sha256 = "0kgmbs3fl9879n48p4m79nxy9by2yhvxq1jdvlnqzzvkdb2sdmg3"; 3587 3587 }; 3588 3588 3589 - buildInputs = with self; [ pytest_30 case ]; 3589 + buildInputs = with self; [ pytest case ]; 3590 3590 propagatedBuildInputs = with self; [ kombu billiard pytz anyjson amqp eventlet ]; 3591 3591 3592 3592 meta = { ··· 3832 3832 sha256 = "400b0bb63d9096b6bf2806efaf742a1cc8b6c88e0484f0afe7d7a7f0e9870609"; 3833 3833 }; 3834 3834 3835 - checkInputs = with self; [ pytest ]; 3835 + checkInputs = with self; [ pytest_29 ]; 3836 3836 propagatedBuildInputs = with self; [ click ] ++ optional (!isPy3k) futures; 3837 3837 3838 3838 checkPhase = '' ··· 4692 4692 sha256 = "0aw1zxmyvx6gfmmnixbqmdaah28jl7rmqkzhxv53091asc23iw9k"; 4693 4693 }; 4694 4694 4695 - buildInputs = with self; [ pytest ]; 4695 + buildInputs = with self; [ pytest_29 ]; 4696 4696 propagatedBuildInputs = with self; [ future numpy ]; 4697 4697 4698 4698 doCheck = true; ··· 4964 4964 }; 4965 4965 }; 4966 4966 4967 - pytest = self.pytest_29; 4967 + pytest = self.pytest_30; 4968 4968 4969 4969 pytest_27 = callPackage ../development/python-modules/pytest/2_7.nix {}; 4970 4970 ··· 4972 4972 4973 4973 pytest_29 = callPackage ../development/python-modules/pytest/2_9.nix {}; 4974 4974 4975 - pytest_30 = callPackage ../development/python-modules/pytest {}; 4975 + pytest_30 = callPackage ../development/python-modules/pytest{ 4976 + hypothesis = self.hypothesis.override { 4977 + # hypothesis requires pytest that causes dependency cycle 4978 + doCheck = false; 4979 + pytest = null; 4980 + }; 4981 + }; 4976 4982 4977 4983 pytestcache = buildPythonPackage rec { 4978 4984 name = "pytest-cache-1.0"; ··· 4998 5004 }; 4999 5005 }; 5000 5006 5001 - pytestdjango = callPackage ../development/python-modules/pytestdjango.nix { 5002 - pytest = self.pytest_30; 5003 - }; 5007 + pytestdjango = callPackage ../development/python-modules/pytestdjango.nix { }; 5004 5008 5005 5009 pytest-fixture-config = buildPythonPackage rec { 5006 5010 name = "${pname}-${version}"; ··· 5589 5593 sha256 = "117savw47c2givq9vxr5m02nyxmsk34l2ihxyy5axlaiqyxyf20s"; 5590 5594 }; 5591 5595 5592 - buildInputs = with self; [ pytest ]; 5596 + buildInputs = with self; [ pytest_29 ]; 5593 5597 patchPhase = '' 5594 5598 sed -i 's/==.*$//' requirements/test.txt 5595 5599 ''; ··· 10344 10348 }; 10345 10349 }; 10346 10350 10347 - django_guardian = callPackage ../development/python-modules/django_guardian.nix { 10348 - pytest = self.pytest_30; 10349 - }; 10351 + django_guardian = callPackage ../development/python-modules/django_guardian.nix { }; 10350 10352 10351 10353 django_tagging = buildPythonPackage rec { 10352 10354 name = "django-tagging-0.4.5"; ··· 12586 12588 propagatedBuildInputs = with self; [ requests2 ]; 12587 12589 }; 12588 12590 12589 - hypothesis = buildPythonPackage rec { 12590 - # http://hypothesis.readthedocs.org/en/latest/packaging.html 12591 - 12592 - # Hypothesis has optional dependencies on the following libraries 12593 - # pytz fake_factory django numpy pytest 12594 - # If you need these, you can just add them to your environment. 12595 - 12596 - name = "hypothesis-${version}"; 12597 - version = "3.5.2"; 12598 - 12599 - # Upstream prefers github tarballs 12600 - src = pkgs.fetchFromGitHub { 12601 - owner = "HypothesisWorks"; 12602 - repo = "hypothesis"; 12603 - rev = "${version}"; 12604 - sha256 = "030rf4gn4b0hylr90wazilwa3bc038fcqng0wibcx67mqaq035n4"; 12605 - }; 12606 - 12607 - buildInputs = with self; [ flake8 pytest flaky ]; 12608 - propagatedBuildInputs = with self; ([ uncompyle6 ] ++ optionals isPy27 [ enum34 ]); 12609 - 12610 - # Fails randomly in tests/cover/test_conjecture_engine.py::test_interleaving_engines. 12611 - doCheck = false; 12612 - 12613 - # https://github.com/DRMacIver/hypothesis/issues/300 12614 - checkPhase = '' 12615 - ${python.interpreter} -m pytest tests/cover 12616 - ''; 12617 - 12618 - meta = { 12619 - description = "A Python library for property based testing"; 12620 - homepage = https://github.com/DRMacIver/hypothesis; 12621 - license = licenses.mpl20; 12622 - }; 12623 - }; 12591 + hypothesis = callPackage ../development/python-modules/hypothesis.nix { }; 12624 12592 12625 12593 colored = buildPythonPackage rec { 12626 12594 name = "colored-${version}"; ··· 13557 13525 sha256 = "18hiricdnbnlz6hx3hbaa4dni6npv8rbid4dhf7k02k16qm6zz6h"; 13558 13526 }; 13559 13527 13560 - buildInputs = with self; [ pytest_30 case pytz ]; 13528 + buildInputs = with self; [ pytest case pytz ]; 13561 13529 13562 13530 propagatedBuildInputs = with self; [ amqp ]; 13563 13531 ··· 18460 18428 sha256 = "0v8aq0xzsa7clazszxl42904c3jpq69lg8a5hg754bqcqf72hfrn"; 18461 18429 }; 18462 18430 LC_ALL="en_US.UTF-8"; 18463 - buildInputs = with self; [ pkgs.glibcLocales pytest ]; 18431 + buildInputs = with self; [ pkgs.glibcLocales pytest_29 ]; 18464 18432 18465 18433 checkPhase = '' 18466 18434 py.test ··· 23424 23392 url = "mirror://pypi/s/${pname}/${name}.tar.gz"; 23425 23393 sha256 = "14220f8f761c48ba1e2526f087195077cf54fad7098b382ce220422f0ff59b12"; 23426 23394 }; 23427 - buildInputs = with self; [ pytest virtualenv pytestrunner pytest-virtualenv ]; 23395 + buildInputs = with self; [ pytest_29 virtualenv pytestrunner pytest-virtualenv ]; 23428 23396 propagatedBuildInputs = with self; [ twisted pathlib2 ]; 23429 23397 postPatch = '' 23430 23398 sed -i '12,$d' tests/test_main.py ··· 31650 31618 url = "mirror://pypi/a/${pname}/${name}.tar.gz"; 31651 31619 sha256 = "1158ml8h3g0vlsgw2jmy579glbg7dn0mjij8xibdl509b8qv9p51"; 31652 31620 }; 31653 - buildInputs = with self; [ unittest2 mock pytest trollius ]; 31621 + buildInputs = with self; [ unittest2 mock pytest_29 trollius ]; 31654 31622 propagatedBuildInputs = with self; [ six twisted txaio ]; 31655 31623 checkPhase = '' 31656 31624 py.test $out ··· 31884 31852 sha256 = "0h94x9mc9bspg23lb1f73h7smdzc39ps7z7sm0q38ds9jahmvfc7"; 31885 31853 }; 31886 31854 31887 - buildInputs = with self; [ case pytest_30 ]; 31855 + buildInputs = with self; [ case pytest ]; 31888 31856 31889 31857 meta = { 31890 31858 homepage = https://github.com/celery/vine;