forked from pool/python-pytest-isort
Accepting request 829559 from devel:languages:python:pytest
OBS-URL: https://build.opensuse.org/request/show/829559 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-isort?expand=0&rev=6
This commit is contained in:
22
pytest6.patch
Normal file
22
pytest6.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
Index: pytest-isort-1.1.0/test_isort.py
|
||||
===================================================================
|
||||
--- pytest-isort-1.1.0.orig/test_isort.py
|
||||
+++ pytest-isort-1.1.0/test_isort.py
|
||||
@@ -155,7 +155,7 @@ class TestIsortItem:
|
||||
path = testdir.tmpdir
|
||||
kwargs = {}
|
||||
|
||||
- test_obj = IsortItem(path, parent, **kwargs)
|
||||
+ test_obj = IsortItem.from_parent(parent, **kwargs, fspath=path)
|
||||
|
||||
assert test_obj.name == path.basename
|
||||
assert test_obj.parent == parent
|
||||
@@ -183,7 +183,7 @@ class TestIsortItem:
|
||||
path = testdir.tmpdir
|
||||
kwargs = {'fspath': path}
|
||||
|
||||
- test_obj = IsortItem(None, parent, **kwargs)
|
||||
+ test_obj = IsortItem.from_parent(parent, **kwargs)
|
||||
|
||||
assert test_obj.name == path.basename
|
||||
assert test_obj.parent == parent
|
||||
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 25 11:53:40 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
||||
|
||||
- Add patch pytest6.patch to fix tests
|
||||
- Drop python2 because newer pytest is needed
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 11 23:13:19 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define skip_python2 1
|
||||
Name: python-pytest-isort
|
||||
Version: 1.1.0
|
||||
Release: 0
|
||||
@@ -24,8 +25,9 @@ Summary: Plugin for pytest to perform isort checks
|
||||
License: BSD-3-Clause
|
||||
URL: https://github.com/moccu/pytest-isort/
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pytest-isort/pytest-isort-%{version}.tar.gz
|
||||
Patch0: pytest6.patch
|
||||
BuildRequires: %{python_module isort >= 4.0}
|
||||
BuildRequires: %{python_module pytest >= 3.5}
|
||||
BuildRequires: %{python_module pytest >= 5}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
@@ -39,6 +41,7 @@ This is a py.test plugin to check import ordering using isort.
|
||||
|
||||
%prep
|
||||
%setup -q -n pytest-isort-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
Reference in New Issue
Block a user