Accepting request 844695 from home:jayvdb:pytest

- Disable Python 2
- Drop no longer needed patches:
  * ignore-warnings.patch
  * pytest-django-pytest6.patch 
- Update to v4.1.0

OBS-URL: https://build.opensuse.org/request/show/844695
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:django/python-pytest-django?expand=0&rev=27
This commit is contained in:
Ondřej Súkup 2020-10-29 09:41:58 +00:00 committed by Git OBS Bridge
parent d6f003cfa6
commit 61e17c917f
6 changed files with 32 additions and 54 deletions

View File

@ -1,13 +0,0 @@
Index: pytest-django-3.9.0/tests/test_fixtures.py
===================================================================
--- pytest-django-3.9.0.orig/tests/test_fixtures.py
+++ pytest-django-3.9.0/tests/test_fixtures.py
@@ -597,7 +597,7 @@ class Migration(migrations.Migration):
)
result = django_testdir.runpytest_subprocess("-s")
- result.stdout.fnmatch_lines(["* 1 passed in*"])
+ result.stdout.fnmatch_lines(["* 1 passed*"])
assert result.ret == 0

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:664e5f42242e5e182519388f01b9f25d824a9feb7cd17d8f863c8d776f38baf9
size 70498

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:26f02c16d36fd4c8672390deebe3413678d89f30720c16efb8b2a6bf63b9041f
size 72780

View File

@ -1,22 +0,0 @@
From 3f03d0a7890e987086042b42db346e47398ffed3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20K=C3=A4ufl?= <pytest-django@c.michael-kaeufl.de>
Date: Sun, 2 Aug 2020 10:41:31 +0200
Subject: [PATCH] Fix compat with pytest 6
---
tests/test_manage_py_scan.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/test_manage_py_scan.py b/tests/test_manage_py_scan.py
index 8a0f9aad..a11f87c2 100644
--- a/tests/test_manage_py_scan.py
+++ b/tests/test_manage_py_scan.py
@@ -116,7 +116,7 @@ def test_django_project_found_invalid_settings_version(django_testdir, monkeypat
"""Invalid DSM should not cause an error with --help or --version."""
monkeypatch.setenv("DJANGO_SETTINGS_MODULE", "DOES_NOT_EXIST")
- result = django_testdir.runpytest_subprocess("django_project_root", "--version")
+ result = django_testdir.runpytest_subprocess("django_project_root", "--version", "--version")
assert result.ret == 0
result.stderr.fnmatch_lines(["*This is pytest version*"])

View File

@ -1,3 +1,27 @@
-------------------------------------------------------------------
Wed Oct 28 23:58:45 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
- Disable Python 2
- Drop no longer needed patches:
* ignore-warnings.patch
* pytest-django-pytest6.patch
- Update to v4.1.0
* Add the async_client and async_rf fixtures
* Add django_debug_mode to configure how DEBUG is set in tests
* Make admin_user work for custom user models without an email
field.
- from v4.0.0
* Drop support for Python versions before 3.5
* Drop support for Django versions before 2.2
* Drop support for pytest versions before 5.4
* Officialy support Python 3.9.
* Add pytest_django.__version__
* Make the admin_user and admin_client fixtures compatible with
custom user models which dont have a username field
* Change the admin_user fixture to use get_by_natural_key()
to get the user instead of directly using USERNAME_FIELD,
in case it is overridden, and to match Django
-------------------------------------------------------------------
Wed Sep 2 13:19:37 UTC 2020 - Benjamin Greiner <code@bnavigator.de>

View File

@ -17,20 +17,17 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
%define skip_python2 1
Name: python-pytest-django
Version: 3.9.0
Version: 4.1.0
Release: 0
Summary: A Django plugin for py.test
License: BSD-3-Clause
URL: https://github.com/pytest-dev/pytest-django
Source: https://files.pythonhosted.org/packages/source/p/pytest-django/pytest-django-%{version}.tar.gz
# fix tests
Patch0: ignore-warnings.patch
# PATCH-FIX-UPSTREAM fix test failure with pytest 6, is part of https://github.com/pytest-dev/pytest-django/pull/855
Patch1: https://github.com/pytest-dev/pytest-django/commit/3f03d0a7890e987086042b42db346e47398ffed3.patch#/pytest-django-pytest6.patch
BuildRequires: %{python_module Django}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pytest > 5.4.0}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module setuptools_scm >= 1.11.1}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
@ -38,14 +35,8 @@ BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: sqlite3
Requires: python-Django
Requires: python-pytest
Requires: python-pytest > 5.4.0
BuildArch: noarch
%if %{with python2}
BuildRequires: python2-pathlib2
%endif
%ifpython2
Requires: python-pathlib2
%endif
%python_subpackages
%description
@ -65,8 +56,6 @@ that are already present in pytest:
%prep
%setup -q -n pytest-django-%{version}
%patch0 -p1
%patch1 -p1
%build
%python_build