diff --git a/pytest6.patch b/pytest6.patch new file mode 100644 index 0000000..2a8178c --- /dev/null +++ b/pytest6.patch @@ -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 diff --git a/python-pytest-isort.changes b/python-pytest-isort.changes index 3bb105e..6ce006c 100644 --- a/python-pytest-isort.changes +++ b/python-pytest-isort.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Aug 25 11:53:40 UTC 2020 - Marketa Calabkova + +- Add patch pytest6.patch to fix tests +- Drop python2 because newer pytest is needed + ------------------------------------------------------------------- Sat Jul 11 23:13:19 UTC 2020 - Benjamin Greiner diff --git a/python-pytest-isort.spec b/python-pytest-isort.spec index c06158c..3c36319 100644 --- a/python-pytest-isort.spec +++ b/python-pytest-isort.spec @@ -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