mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-24 22:04:20 +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
|
||||
, django
|
||||
, django-allauth
|
||||
, djangorestframework
|
||||
, djangorestframework-simplejwt
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, python
|
||||
, pythonOlder
|
||||
, responses
|
||||
, setuptools
|
||||
, unittest-xml-reporting
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
django,
|
||||
django-allauth,
|
||||
djangorestframework,
|
||||
djangorestframework-simplejwt,
|
||||
fetchFromGitHub,
|
||||
python,
|
||||
pythonOlder,
|
||||
responses,
|
||||
setuptools,
|
||||
unittest-xml-reporting,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "dj-rest-auth";
|
||||
version = "5.0.2";
|
||||
version = "6.0.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "iMerica";
|
||||
repo = "dj-rest-auth";
|
||||
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 = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "==" ">="
|
||||
--replace-fail "==" ">="
|
||||
substituteInPlace dj_rest_auth/tests/test_api.py \
|
||||
--replace-fail "assertEquals" "assertEqual"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools
|
||||
];
|
||||
build-system = [ setuptools ];
|
||||
|
||||
buildInputs = [
|
||||
django
|
||||
];
|
||||
buildInputs = [ django ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
djangorestframework
|
||||
];
|
||||
dependencies = [ djangorestframework ];
|
||||
|
||||
passthru.optional-dependencies.with_social = [
|
||||
django-allauth
|
||||
];
|
||||
passthru.optional-dependencies.with_social = [ django-allauth ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
djangorestframework-simplejwt
|
||||
@ -66,7 +51,7 @@ buildPythonPackage rec {
|
||||
preCheck = ''
|
||||
# Test connects to graph.facebook.com
|
||||
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 = ''
|
||||
@ -75,9 +60,7 @@ buildPythonPackage rec {
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"dj_rest_auth"
|
||||
];
|
||||
pythonImportsCheck = [ "dj_rest_auth" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Authentication for Django Rest Framework";
|
||||
|
@ -1,42 +1,47 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, dj-rest-auth
|
||||
, django
|
||||
, django-allauth
|
||||
, django-filter
|
||||
, django-oauth-toolkit
|
||||
, django-polymorphic
|
||||
, django-rest-auth
|
||||
, django-rest-polymorphic
|
||||
, djangorestframework
|
||||
, djangorestframework-camel-case
|
||||
, djangorestframework-dataclasses
|
||||
, djangorestframework-recursive
|
||||
, djangorestframework-simplejwt
|
||||
, drf-jwt
|
||||
, drf-nested-routers
|
||||
, drf-spectacular-sidecar
|
||||
, inflection
|
||||
, jsonschema
|
||||
, psycopg2
|
||||
, pytest-django
|
||||
, pytestCheckHook
|
||||
, pyyaml
|
||||
, uritemplate
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
dj-rest-auth,
|
||||
django,
|
||||
django-allauth,
|
||||
django-filter,
|
||||
django-oauth-toolkit,
|
||||
django-polymorphic,
|
||||
django-rest-auth,
|
||||
django-rest-polymorphic,
|
||||
djangorestframework,
|
||||
djangorestframework-camel-case,
|
||||
djangorestframework-dataclasses,
|
||||
djangorestframework-recursive,
|
||||
djangorestframework-simplejwt,
|
||||
drf-jwt,
|
||||
drf-nested-routers,
|
||||
drf-spectacular-sidecar,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
inflection,
|
||||
jsonschema,
|
||||
psycopg2,
|
||||
pytest-django,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
pyyaml,
|
||||
setuptools,
|
||||
uritemplate,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "drf-spectacular";
|
||||
version = "0.27.1";
|
||||
format = "setuptools";
|
||||
version = "0.27.2";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tfranzel";
|
||||
repo = "drf-spectacular";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-R6rxEo9SNNziXRWB+01UUInParpGcFDIkDZtN4k+dFE=";
|
||||
hash = "sha256-lOgFDkAY+PqSeyLSvWFT7KPVicSJZxd6yl17GAGHbRs=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@ -47,7 +52,9 @@ buildPythonPackage rec {
|
||||
})
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
django
|
||||
djangorestframework
|
||||
inflection
|
||||
@ -77,10 +84,11 @@ buildPythonPackage rec {
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# requires django with gdal
|
||||
# Test requires django with gdal
|
||||
"test_rest_framework_gis"
|
||||
# outdated test artifact
|
||||
# Outdated test artifact
|
||||
"test_pydantic_decoration"
|
||||
"test_knox_auth_token"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "drf_spectacular" ];
|
||||
|
@ -1,44 +1,48 @@
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, buildPythonPackage
|
||||
, lxml
|
||||
, pythonAtLeast
|
||||
, pythonOlder
|
||||
, pytestCheckHook
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
lxml,
|
||||
pytestCheckHook,
|
||||
pythonAtLeast,
|
||||
pythonOlder,
|
||||
setuptools,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "unittest-xml-reporting";
|
||||
version = "3.2.0";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "xmlrunner";
|
||||
repo = "unittest-xml-reporting";
|
||||
rev = version;
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-lOJ/+8CVJUXdIaZLLF5PpPkG0DzlNgo46kRZ1Xy7Ju0=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
lxml
|
||||
];
|
||||
build-system = [ setuptools ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
dependencies = [ lxml ];
|
||||
|
||||
pytestFlagsArray = lib.optionals (pythonAtLeast "3.11") [
|
||||
# AttributeError: 'tuple' object has no attribute 'shortDescription'
|
||||
"--deselect=tests/testsuite.py::XMLTestRunnerTestCase::test_basic_unittest_constructs"
|
||||
"--deselect=tests/testsuite.py::XMLTestRunnerTestCase::test_unexpected_success"
|
||||
];
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
disabledTests =
|
||||
lib.optionals (pythonAtLeast "3.11") [
|
||||
# AttributeError: 'tuple' object has no attribute 'shortDescription'
|
||||
"test_basic_unittest_constructs"
|
||||
"test_unexpected_success"
|
||||
]
|
||||
++ lib.optionals (pythonAtLeast "3.12") [ "test_xmlrunner_hold_traceback" ];
|
||||
|
||||
pythonImportsCheck = [ "xmlrunner" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Unittest-based test runner with Ant/JUnit like 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;
|
||||
maintainers = with maintainers; [ rprospero ];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user