forked from pool/python-flake8-pep3101
- Add 29.patch to fix tests
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flake8-pep3101?expand=0&rev=5
This commit is contained in:
25
29.patch
Normal file
25
29.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
From c196256a0f24d43bc45afb4c2d88b2b1a0008f37 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Garcia Moreno <daniel.garcia@suse.com>
|
||||
Date: Tue, 4 Oct 2022 18:15:16 +0200
|
||||
Subject: [PATCH] tests: Fix test_multiline_formatter
|
||||
|
||||
This test fails with the latest version of flake8 because it tries to
|
||||
write to sys.stdout.buffer and the OutputCapture by default uses
|
||||
StringIO. This patch changes this specific test to use files instead.
|
||||
---
|
||||
run_tests.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/run_tests.py b/run_tests.py
|
||||
index 95f5c28..9c5e911 100644
|
||||
--- a/run_tests.py
|
||||
+++ b/run_tests.py
|
||||
@@ -62,7 +62,7 @@ def test_multiline_formatter(self):
|
||||
'% (\'world\'))',
|
||||
]))
|
||||
app = application.Application()
|
||||
- with OutputCapture() as output:
|
||||
+ with OutputCapture(fd=True) as output:
|
||||
app.run([file_path, ])
|
||||
|
||||
self.assertIn(
|
||||
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 4 16:20:28 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Add 29.patch to fix tests
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 16 10:40:00 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-flake8-pep3101
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -25,6 +25,8 @@ License: GPL-2.0-only
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/gforcada/flake8-pep3101
|
||||
Source: https://files.pythonhosted.org/packages/source/f/flake8-pep3101/flake8-pep3101-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM 29.patch gh#gforcada/flake8-pep3101#29
|
||||
Patch: https://github.com/gforcada/flake8-pep3101/pull/29.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
@@ -41,7 +43,7 @@ BuildRequires: %{python_module testfixtures}
|
||||
Checks for old string formatting.
|
||||
|
||||
%prep
|
||||
%setup -q -n flake8-pep3101-%{version}
|
||||
%autosetup -p1 -n flake8-pep3101-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
Reference in New Issue
Block a user