Merge pull request #311282 from fabaff/unittest-xml-reporting-fix

python312Packages.unittest-xml-reporting: disable failing test

authored by Fabian Affolter and committed by GitHub 56c7ebdc 055b3296

+91 -96
+25 -42
pkgs/development/python-modules/dj-rest-auth/default.nix
··· 1 - { lib 2 - , buildPythonPackage 3 - , django 4 - , django-allauth 5 - , djangorestframework 6 - , djangorestframework-simplejwt 7 - , fetchFromGitHub 8 - , fetchpatch 9 - , python 10 - , pythonOlder 11 - , responses 12 - , setuptools 13 - , unittest-xml-reporting 14 }: 15 16 buildPythonPackage rec { 17 pname = "dj-rest-auth"; 18 - version = "5.0.2"; 19 pyproject = true; 20 21 - disabled = pythonOlder "3.6"; 22 23 src = fetchFromGitHub { 24 owner = "iMerica"; 25 repo = "dj-rest-auth"; 26 rev = "refs/tags/${version}"; 27 - hash = "sha256-TqeNpxXn+v89fEiJ4AVNhp8blCfYQKFQfYmZ6/QlRbQ="; 28 }; 29 30 - patches = [ 31 - # https://github.com/iMerica/dj-rest-auth/pull/597 32 - (fetchpatch { 33 - name = "disable-email-confirmation-ratelimit-in-tests-to-support-new-allauth.patch"; 34 - url = "https://github.com/iMerica/dj-rest-auth/commit/c8f19e18a93f4959da875f9c5cdd32f7d9363bba.patch"; 35 - hash = "sha256-Y/YBjV+c5Gw1wMR5r/4VnyV/ewUVG0z4pjY/MB4ca9Y="; 36 - }) 37 - ]; 38 - 39 postPatch = '' 40 substituteInPlace setup.py \ 41 - --replace "==" ">=" 42 ''; 43 44 - nativeBuildInputs = [ 45 - setuptools 46 - ]; 47 48 - buildInputs = [ 49 - django 50 - ]; 51 52 - propagatedBuildInputs = [ 53 - djangorestframework 54 - ]; 55 56 - passthru.optional-dependencies.with_social = [ 57 - django-allauth 58 - ]; 59 60 nativeCheckInputs = [ 61 djangorestframework-simplejwt ··· 66 preCheck = '' 67 # Test connects to graph.facebook.com 68 substituteInPlace dj_rest_auth/tests/test_serializers.py \ 69 - --replace "def test_http_error" "def dont_test_http_error" 70 ''; 71 72 checkPhase = '' ··· 75 runHook postCheck 76 ''; 77 78 - pythonImportsCheck = [ 79 - "dj_rest_auth" 80 - ]; 81 82 meta = with lib; { 83 description = "Authentication for Django Rest Framework";
··· 1 + { 2 + lib, 3 + buildPythonPackage, 4 + django, 5 + django-allauth, 6 + djangorestframework, 7 + djangorestframework-simplejwt, 8 + fetchFromGitHub, 9 + python, 10 + pythonOlder, 11 + responses, 12 + setuptools, 13 + unittest-xml-reporting, 14 }: 15 16 buildPythonPackage rec { 17 pname = "dj-rest-auth"; 18 + version = "6.0.0"; 19 pyproject = true; 20 21 + disabled = pythonOlder "3.8"; 22 23 src = fetchFromGitHub { 24 owner = "iMerica"; 25 repo = "dj-rest-auth"; 26 rev = "refs/tags/${version}"; 27 + hash = "sha256-fNy1uN3oH54Wd9+EqYpiV0ot1MbSSC7TZoAARQeR81s="; 28 }; 29 30 postPatch = '' 31 substituteInPlace setup.py \ 32 + --replace-fail "==" ">=" 33 + substituteInPlace dj_rest_auth/tests/test_api.py \ 34 + --replace-fail "assertEquals" "assertEqual" 35 ''; 36 37 + build-system = [ setuptools ]; 38 39 + buildInputs = [ django ]; 40 41 + dependencies = [ djangorestframework ]; 42 43 + passthru.optional-dependencies.with_social = [ django-allauth ]; 44 45 nativeCheckInputs = [ 46 djangorestframework-simplejwt ··· 51 preCheck = '' 52 # Test connects to graph.facebook.com 53 substituteInPlace dj_rest_auth/tests/test_serializers.py \ 54 + --replace-fail "def test_http_error" "def dont_test_http_error" 55 ''; 56 57 checkPhase = '' ··· 60 runHook postCheck 61 ''; 62 63 + pythonImportsCheck = [ "dj_rest_auth" ]; 64 65 meta = with lib; { 66 description = "Authentication for Django Rest Framework";
+41 -33
pkgs/development/python-modules/drf-spectacular/default.nix
··· 1 - { lib 2 - , buildPythonPackage 3 - , fetchFromGitHub 4 - , fetchpatch 5 - , dj-rest-auth 6 - , django 7 - , django-allauth 8 - , django-filter 9 - , django-oauth-toolkit 10 - , django-polymorphic 11 - , django-rest-auth 12 - , django-rest-polymorphic 13 - , djangorestframework 14 - , djangorestframework-camel-case 15 - , djangorestframework-dataclasses 16 - , djangorestframework-recursive 17 - , djangorestframework-simplejwt 18 - , drf-jwt 19 - , drf-nested-routers 20 - , drf-spectacular-sidecar 21 - , inflection 22 - , jsonschema 23 - , psycopg2 24 - , pytest-django 25 - , pytestCheckHook 26 - , pyyaml 27 - , uritemplate 28 }: 29 30 buildPythonPackage rec { 31 pname = "drf-spectacular"; 32 - version = "0.27.1"; 33 - format = "setuptools"; 34 35 src = fetchFromGitHub { 36 owner = "tfranzel"; 37 repo = "drf-spectacular"; 38 rev = "refs/tags/${version}"; 39 - hash = "sha256-R6rxEo9SNNziXRWB+01UUInParpGcFDIkDZtN4k+dFE="; 40 }; 41 42 patches = [ ··· 47 }) 48 ]; 49 50 - propagatedBuildInputs = [ 51 django 52 djangorestframework 53 inflection ··· 77 ]; 78 79 disabledTests = [ 80 - # requires django with gdal 81 "test_rest_framework_gis" 82 - # outdated test artifact 83 "test_pydantic_decoration" 84 ]; 85 86 pythonImportsCheck = [ "drf_spectacular" ];
··· 1 + { 2 + lib, 3 + buildPythonPackage, 4 + dj-rest-auth, 5 + django, 6 + django-allauth, 7 + django-filter, 8 + django-oauth-toolkit, 9 + django-polymorphic, 10 + django-rest-auth, 11 + django-rest-polymorphic, 12 + djangorestframework, 13 + djangorestframework-camel-case, 14 + djangorestframework-dataclasses, 15 + djangorestframework-recursive, 16 + djangorestframework-simplejwt, 17 + drf-jwt, 18 + drf-nested-routers, 19 + drf-spectacular-sidecar, 20 + fetchFromGitHub, 21 + fetchpatch, 22 + inflection, 23 + jsonschema, 24 + psycopg2, 25 + pytest-django, 26 + pytestCheckHook, 27 + pythonOlder, 28 + pyyaml, 29 + setuptools, 30 + uritemplate, 31 }: 32 33 buildPythonPackage rec { 34 pname = "drf-spectacular"; 35 + version = "0.27.2"; 36 + pyproject = true; 37 + 38 + disabled = pythonOlder "3.7"; 39 40 src = fetchFromGitHub { 41 owner = "tfranzel"; 42 repo = "drf-spectacular"; 43 rev = "refs/tags/${version}"; 44 + hash = "sha256-lOgFDkAY+PqSeyLSvWFT7KPVicSJZxd6yl17GAGHbRs="; 45 }; 46 47 patches = [ ··· 52 }) 53 ]; 54 55 + build-system = [ setuptools ]; 56 + 57 + dependencies = [ 58 django 59 djangorestframework 60 inflection ··· 84 ]; 85 86 disabledTests = [ 87 + # Test requires django with gdal 88 "test_rest_framework_gis" 89 + # Outdated test artifact 90 "test_pydantic_decoration" 91 + "test_knox_auth_token" 92 ]; 93 94 pythonImportsCheck = [ "drf_spectacular" ];
+25 -21
pkgs/development/python-modules/unittest-xml-reporting/default.nix
··· 1 - { lib 2 - , fetchFromGitHub 3 - , buildPythonPackage 4 - , lxml 5 - , pythonAtLeast 6 - , pythonOlder 7 - , pytestCheckHook 8 }: 9 10 buildPythonPackage rec { 11 pname = "unittest-xml-reporting"; 12 version = "3.2.0"; 13 - format = "setuptools"; 14 disabled = pythonOlder "3.7"; 15 16 src = fetchFromGitHub { 17 owner = "xmlrunner"; 18 repo = "unittest-xml-reporting"; 19 - rev = version; 20 hash = "sha256-lOJ/+8CVJUXdIaZLLF5PpPkG0DzlNgo46kRZ1Xy7Ju0="; 21 }; 22 23 - propagatedBuildInputs = [ 24 - lxml 25 - ]; 26 27 - nativeCheckInputs = [ 28 - pytestCheckHook 29 - ]; 30 31 - pytestFlagsArray = lib.optionals (pythonAtLeast "3.11") [ 32 - # AttributeError: 'tuple' object has no attribute 'shortDescription' 33 - "--deselect=tests/testsuite.py::XMLTestRunnerTestCase::test_basic_unittest_constructs" 34 - "--deselect=tests/testsuite.py::XMLTestRunnerTestCase::test_unexpected_success" 35 - ]; 36 37 pythonImportsCheck = [ "xmlrunner" ]; 38 39 meta = with lib; { 40 homepage = "https://github.com/xmlrunner/unittest-xml-reporting"; 41 - description = "unittest-based test runner with Ant/JUnit like XML reporting"; 42 license = licenses.bsd2; 43 maintainers = with maintainers; [ rprospero ]; 44 };
··· 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchFromGitHub, 5 + lxml, 6 + pytestCheckHook, 7 + pythonAtLeast, 8 + pythonOlder, 9 + setuptools, 10 }: 11 12 buildPythonPackage rec { 13 pname = "unittest-xml-reporting"; 14 version = "3.2.0"; 15 + pyproject = true; 16 + 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "xmlrunner"; 21 repo = "unittest-xml-reporting"; 22 + rev = "refs/tags/${version}"; 23 hash = "sha256-lOJ/+8CVJUXdIaZLLF5PpPkG0DzlNgo46kRZ1Xy7Ju0="; 24 }; 25 26 + build-system = [ setuptools ]; 27 28 + dependencies = [ lxml ]; 29 30 + nativeCheckInputs = [ pytestCheckHook ]; 31 + 32 + disabledTests = 33 + lib.optionals (pythonAtLeast "3.11") [ 34 + # AttributeError: 'tuple' object has no attribute 'shortDescription' 35 + "test_basic_unittest_constructs" 36 + "test_unexpected_success" 37 + ] 38 + ++ lib.optionals (pythonAtLeast "3.12") [ "test_xmlrunner_hold_traceback" ]; 39 40 pythonImportsCheck = [ "xmlrunner" ]; 41 42 meta = with lib; { 43 + description = "Unittest-based test runner with Ant/JUnit like XML reporting"; 44 homepage = "https://github.com/xmlrunner/unittest-xml-reporting"; 45 + changelog = "https://github.com/xmlrunner/unittest-xml-reporting/releases/tag/${version}"; 46 license = licenses.bsd2; 47 maintainers = with maintainers; [ rprospero ]; 48 };