mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-12 13:57:23 +00:00
Merge pull request #311282 from fabaff/unittest-xml-reporting-fix
python312Packages.unittest-xml-reporting: disable failing test
This commit is contained in:
commit
56c7ebdc5e
@ -1,61 +1,46 @@
|
|||||||
{ lib
|
{
|
||||||
, buildPythonPackage
|
lib,
|
||||||
, django
|
buildPythonPackage,
|
||||||
, django-allauth
|
django,
|
||||||
, djangorestframework
|
django-allauth,
|
||||||
, djangorestframework-simplejwt
|
djangorestframework,
|
||||||
, fetchFromGitHub
|
djangorestframework-simplejwt,
|
||||||
, fetchpatch
|
fetchFromGitHub,
|
||||||
, python
|
python,
|
||||||
, pythonOlder
|
pythonOlder,
|
||||||
, responses
|
responses,
|
||||||
, setuptools
|
setuptools,
|
||||||
, unittest-xml-reporting
|
unittest-xml-reporting,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "dj-rest-auth";
|
pname = "dj-rest-auth";
|
||||||
version = "5.0.2";
|
version = "6.0.0";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
disabled = pythonOlder "3.6";
|
disabled = pythonOlder "3.8";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "iMerica";
|
owner = "iMerica";
|
||||||
repo = "dj-rest-auth";
|
repo = "dj-rest-auth";
|
||||||
rev = "refs/tags/${version}";
|
rev = "refs/tags/${version}";
|
||||||
hash = "sha256-TqeNpxXn+v89fEiJ4AVNhp8blCfYQKFQfYmZ6/QlRbQ=";
|
hash = "sha256-fNy1uN3oH54Wd9+EqYpiV0ot1MbSSC7TZoAARQeR81s=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
|
||||||
# https://github.com/iMerica/dj-rest-auth/pull/597
|
|
||||||
(fetchpatch {
|
|
||||||
name = "disable-email-confirmation-ratelimit-in-tests-to-support-new-allauth.patch";
|
|
||||||
url = "https://github.com/iMerica/dj-rest-auth/commit/c8f19e18a93f4959da875f9c5cdd32f7d9363bba.patch";
|
|
||||||
hash = "sha256-Y/YBjV+c5Gw1wMR5r/4VnyV/ewUVG0z4pjY/MB4ca9Y=";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace setup.py \
|
substituteInPlace setup.py \
|
||||||
--replace "==" ">="
|
--replace-fail "==" ">="
|
||||||
|
substituteInPlace dj_rest_auth/tests/test_api.py \
|
||||||
|
--replace-fail "assertEquals" "assertEqual"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
build-system = [ setuptools ];
|
||||||
setuptools
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [ django ];
|
||||||
django
|
|
||||||
];
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
dependencies = [ djangorestframework ];
|
||||||
djangorestframework
|
|
||||||
];
|
|
||||||
|
|
||||||
passthru.optional-dependencies.with_social = [
|
passthru.optional-dependencies.with_social = [ django-allauth ];
|
||||||
django-allauth
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
djangorestframework-simplejwt
|
djangorestframework-simplejwt
|
||||||
@ -66,7 +51,7 @@ buildPythonPackage rec {
|
|||||||
preCheck = ''
|
preCheck = ''
|
||||||
# Test connects to graph.facebook.com
|
# Test connects to graph.facebook.com
|
||||||
substituteInPlace dj_rest_auth/tests/test_serializers.py \
|
substituteInPlace dj_rest_auth/tests/test_serializers.py \
|
||||||
--replace "def test_http_error" "def dont_test_http_error"
|
--replace-fail "def test_http_error" "def dont_test_http_error"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
@ -75,9 +60,7 @@ buildPythonPackage rec {
|
|||||||
runHook postCheck
|
runHook postCheck
|
||||||
'';
|
'';
|
||||||
|
|
||||||
pythonImportsCheck = [
|
pythonImportsCheck = [ "dj_rest_auth" ];
|
||||||
"dj_rest_auth"
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Authentication for Django Rest Framework";
|
description = "Authentication for Django Rest Framework";
|
||||||
|
@ -1,42 +1,47 @@
|
|||||||
{ lib
|
{
|
||||||
, buildPythonPackage
|
lib,
|
||||||
, fetchFromGitHub
|
buildPythonPackage,
|
||||||
, fetchpatch
|
dj-rest-auth,
|
||||||
, dj-rest-auth
|
django,
|
||||||
, django
|
django-allauth,
|
||||||
, django-allauth
|
django-filter,
|
||||||
, django-filter
|
django-oauth-toolkit,
|
||||||
, django-oauth-toolkit
|
django-polymorphic,
|
||||||
, django-polymorphic
|
django-rest-auth,
|
||||||
, django-rest-auth
|
django-rest-polymorphic,
|
||||||
, django-rest-polymorphic
|
djangorestframework,
|
||||||
, djangorestframework
|
djangorestframework-camel-case,
|
||||||
, djangorestframework-camel-case
|
djangorestframework-dataclasses,
|
||||||
, djangorestframework-dataclasses
|
djangorestframework-recursive,
|
||||||
, djangorestframework-recursive
|
djangorestframework-simplejwt,
|
||||||
, djangorestframework-simplejwt
|
drf-jwt,
|
||||||
, drf-jwt
|
drf-nested-routers,
|
||||||
, drf-nested-routers
|
drf-spectacular-sidecar,
|
||||||
, drf-spectacular-sidecar
|
fetchFromGitHub,
|
||||||
, inflection
|
fetchpatch,
|
||||||
, jsonschema
|
inflection,
|
||||||
, psycopg2
|
jsonschema,
|
||||||
, pytest-django
|
psycopg2,
|
||||||
, pytestCheckHook
|
pytest-django,
|
||||||
, pyyaml
|
pytestCheckHook,
|
||||||
, uritemplate
|
pythonOlder,
|
||||||
|
pyyaml,
|
||||||
|
setuptools,
|
||||||
|
uritemplate,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "drf-spectacular";
|
pname = "drf-spectacular";
|
||||||
version = "0.27.1";
|
version = "0.27.2";
|
||||||
format = "setuptools";
|
pyproject = true;
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "tfranzel";
|
owner = "tfranzel";
|
||||||
repo = "drf-spectacular";
|
repo = "drf-spectacular";
|
||||||
rev = "refs/tags/${version}";
|
rev = "refs/tags/${version}";
|
||||||
hash = "sha256-R6rxEo9SNNziXRWB+01UUInParpGcFDIkDZtN4k+dFE=";
|
hash = "sha256-lOgFDkAY+PqSeyLSvWFT7KPVicSJZxd6yl17GAGHbRs=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
@ -47,7 +52,9 @@ buildPythonPackage rec {
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
build-system = [ setuptools ];
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
django
|
django
|
||||||
djangorestframework
|
djangorestframework
|
||||||
inflection
|
inflection
|
||||||
@ -77,10 +84,11 @@ buildPythonPackage rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
disabledTests = [
|
disabledTests = [
|
||||||
# requires django with gdal
|
# Test requires django with gdal
|
||||||
"test_rest_framework_gis"
|
"test_rest_framework_gis"
|
||||||
# outdated test artifact
|
# Outdated test artifact
|
||||||
"test_pydantic_decoration"
|
"test_pydantic_decoration"
|
||||||
|
"test_knox_auth_token"
|
||||||
];
|
];
|
||||||
|
|
||||||
pythonImportsCheck = [ "drf_spectacular" ];
|
pythonImportsCheck = [ "drf_spectacular" ];
|
||||||
|
@ -1,44 +1,48 @@
|
|||||||
{ lib
|
{
|
||||||
, fetchFromGitHub
|
lib,
|
||||||
, buildPythonPackage
|
buildPythonPackage,
|
||||||
, lxml
|
fetchFromGitHub,
|
||||||
, pythonAtLeast
|
lxml,
|
||||||
, pythonOlder
|
pytestCheckHook,
|
||||||
, pytestCheckHook
|
pythonAtLeast,
|
||||||
|
pythonOlder,
|
||||||
|
setuptools,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "unittest-xml-reporting";
|
pname = "unittest-xml-reporting";
|
||||||
version = "3.2.0";
|
version = "3.2.0";
|
||||||
format = "setuptools";
|
pyproject = true;
|
||||||
|
|
||||||
disabled = pythonOlder "3.7";
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "xmlrunner";
|
owner = "xmlrunner";
|
||||||
repo = "unittest-xml-reporting";
|
repo = "unittest-xml-reporting";
|
||||||
rev = version;
|
rev = "refs/tags/${version}";
|
||||||
hash = "sha256-lOJ/+8CVJUXdIaZLLF5PpPkG0DzlNgo46kRZ1Xy7Ju0=";
|
hash = "sha256-lOJ/+8CVJUXdIaZLLF5PpPkG0DzlNgo46kRZ1Xy7Ju0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
build-system = [ setuptools ];
|
||||||
lxml
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeCheckInputs = [
|
dependencies = [ lxml ];
|
||||||
pytestCheckHook
|
|
||||||
];
|
|
||||||
|
|
||||||
pytestFlagsArray = lib.optionals (pythonAtLeast "3.11") [
|
nativeCheckInputs = [ pytestCheckHook ];
|
||||||
|
|
||||||
|
disabledTests =
|
||||||
|
lib.optionals (pythonAtLeast "3.11") [
|
||||||
# AttributeError: 'tuple' object has no attribute 'shortDescription'
|
# AttributeError: 'tuple' object has no attribute 'shortDescription'
|
||||||
"--deselect=tests/testsuite.py::XMLTestRunnerTestCase::test_basic_unittest_constructs"
|
"test_basic_unittest_constructs"
|
||||||
"--deselect=tests/testsuite.py::XMLTestRunnerTestCase::test_unexpected_success"
|
"test_unexpected_success"
|
||||||
];
|
]
|
||||||
|
++ lib.optionals (pythonAtLeast "3.12") [ "test_xmlrunner_hold_traceback" ];
|
||||||
|
|
||||||
pythonImportsCheck = [ "xmlrunner" ];
|
pythonImportsCheck = [ "xmlrunner" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
description = "Unittest-based test runner with Ant/JUnit like XML reporting";
|
||||||
homepage = "https://github.com/xmlrunner/unittest-xml-reporting";
|
homepage = "https://github.com/xmlrunner/unittest-xml-reporting";
|
||||||
description = "unittest-based test runner with Ant/JUnit like XML reporting";
|
changelog = "https://github.com/xmlrunner/unittest-xml-reporting/releases/tag/${version}";
|
||||||
license = licenses.bsd2;
|
license = licenses.bsd2;
|
||||||
maintainers = with maintainers; [ rprospero ];
|
maintainers = with maintainers; [ rprospero ];
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user