forked from pool/python-pytest-black
Accepting request 879137 from home:bnavigator:branches:devel:languages:python:pytest
- Add fix-pytest-makefile.patch to make it work with Pytest 6 gh#shopkeep/pytest-black#53 OBS-URL: https://build.opensuse.org/request/show/879137 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-black?expand=0&rev=10
This commit is contained in:
46
fix-pytest-makefile.patch
Normal file
46
fix-pytest-makefile.patch
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
From 475cf71aa9de3ededa972ffb36fb47ad79278531 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ben Greiner <code@bnavigator.de>
|
||||||
|
Date: Mon, 15 Mar 2021 11:42:27 +0100
|
||||||
|
Subject: [PATCH] fix pytest.tmpdir.makefile call
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/test_black.py | 12 ++++++------
|
||||||
|
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_black.py b/tests/test_black.py
|
||||||
|
index 0405169..a7a6026 100644
|
||||||
|
--- a/tests/test_black.py
|
||||||
|
+++ b/tests/test_black.py
|
||||||
|
@@ -72,8 +72,8 @@ def test_exclude(testdir):
|
||||||
|
"""Assert test is skipped if path is excluded even if also included
|
||||||
|
"""
|
||||||
|
testdir.makefile(
|
||||||
|
- "pyproject.toml",
|
||||||
|
- """
|
||||||
|
+ ".toml",
|
||||||
|
+ pyproject = """
|
||||||
|
[tool.black]
|
||||||
|
include = 'test_exclude.py'
|
||||||
|
exclude = '.*'
|
||||||
|
@@ -100,8 +100,8 @@ def test_exclude_folder(testdir):
|
||||||
|
"""Assert test is skipped for files in a folder
|
||||||
|
"""
|
||||||
|
testdir.makefile(
|
||||||
|
- "pyproject.toml",
|
||||||
|
- """
|
||||||
|
+ ".toml",
|
||||||
|
+ pyproject = """
|
||||||
|
[tool.black]
|
||||||
|
exclude = '''
|
||||||
|
(
|
||||||
|
@@ -137,8 +137,8 @@ def test_include(testdir):
|
||||||
|
"""Assert test is not skipped if path is included but not excluded
|
||||||
|
"""
|
||||||
|
testdir.makefile(
|
||||||
|
- "pyproject.toml",
|
||||||
|
- """
|
||||||
|
+ ".toml",
|
||||||
|
+ pyproject = """
|
||||||
|
[tool.black]
|
||||||
|
include = 'test_include'
|
||||||
|
""",
|
||||||
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 15 10:47:48 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Add fix-pytest-makefile.patch to make it work with Pytest 6
|
||||||
|
gh#shopkeep/pytest-black#53
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Oct 7 13:57:46 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
Wed Oct 7 13:57:46 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pytest-black
|
# spec file for package python-pytest-black
|
||||||
#
|
#
|
||||||
# Copyright (c) 2020 SUSE LLC
|
# Copyright (c) 2021 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -25,6 +25,8 @@ Summary: Black format checking plugin for pytest
|
|||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/shopkeep/pytest-black
|
URL: https://github.com/shopkeep/pytest-black
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/pytest-black/pytest-black-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/p/pytest-black/pytest-black-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM fix-pytest-makefile.patch -- gh#shopkeep/pytest-black#53
|
||||||
|
Patch0: https://github.com/shopkeep/pytest-black/pull/53.patch#/fix-pytest-makefile.patch
|
||||||
BuildRequires: %{python_module setuptools_scm}
|
BuildRequires: %{python_module setuptools_scm}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@@ -44,7 +46,7 @@ BuildRequires: %{python_module toml}
|
|||||||
A pytest plugin to enable format checking with black.
|
A pytest plugin to enable format checking with black.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n pytest-black-%{version}
|
%autosetup -p1 -n pytest-black-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
|||||||
Reference in New Issue
Block a user