Accepting request 826232 from home:bnavigator:branches:devel:languages:python:pytest

- Update to Version 4.0.1
  * Maintenance of pytest-flakes has moved from fschulze to
    asmeurer. The repo for pytest-flakes is now at 
    https://github.com/asmeurer/pytest-flakes/
  * Fix test failures. [asmeurer]
  * Fix deprecation warnings from pytest. [asmeurer]
  * Fix invalid escape sequences. [akeeman]
- drop patches for fixed test
  * remove-bad-test.patch
  * replace-pytest-pep8-with-pytest-codestyle.patch
- no pytest-codestyle needed for packaging

OBS-URL: https://build.opensuse.org/request/show/826232
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-flakes?expand=0&rev=9
This commit is contained in:
Tomáš Chvátal 2020-08-13 16:29:37 +00:00 committed by Git OBS Bridge
parent 926362620b
commit 7920a68d49
6 changed files with 25 additions and 84 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:341964bf5760ebbdde9619f68a17d5632c674c3f6903ef66daa0a4f540b3d143
size 7138

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:37113ac6c7ea5e0b648abf73937955a45f8b9214fe49413297c2ce6ce1808500
size 7146

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Thu Aug 13 08:50:18 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
- Update to Version 4.0.1
* Maintenance of pytest-flakes has moved from fschulze to
asmeurer. The repo for pytest-flakes is now at
https://github.com/asmeurer/pytest-flakes/
* Fix test failures. [asmeurer]
* Fix deprecation warnings from pytest. [asmeurer]
* Fix invalid escape sequences. [akeeman]
- drop patches for fixed test
* remove-bad-test.patch
* replace-pytest-pep8-with-pytest-codestyle.patch
- no pytest-codestyle needed for packaging
-------------------------------------------------------------------
Fri Dec 6 14:13:07 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-pytest-flakes
#
# Copyright (c) 2019 SUSE LLC
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -18,21 +18,18 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytest-flakes
Version: 4.0.0
Version: 4.0.1
Release: 0
Summary: Pytest plugin to check source code with pyflakes
License: MIT
Group: Development/Languages/Python
URL: https://github.com/fschulze/pytest-flakes
URL: https://github.com/asmeurer/pytest-flakes
Source: https://files.pythonhosted.org/packages/source/p/pytest-flakes/pytest-flakes-%{version}.tar.gz
Patch0: remove-bad-test.patch
Patch1: replace-pytest-pep8-with-pytest-codestyle.patch
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
# Test requirements
BuildRequires: %{python_module pyflakes}
BuildRequires: %{python_module pytest >= 2.8.0}
BuildRequires: %{python_module pytest-codestyle}
# End of test requirements
BuildRequires: fdupes
Requires: python-pyflakes
@ -46,9 +43,6 @@ py.test plugin for efficiently checking python source with pyflakes.
%prep
%setup -q -n pytest-flakes-%{version}
%patch0 -p1
%patch1 -p1
rm tox.ini
%build
%python_build
@ -58,11 +52,13 @@ rm tox.ini
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
%pytest test_flakes.py
%files %{python_files}
%doc README.rst
%license LICENSE
%{python_sitelib}/*
%{python_sitelib}/pytest_flakes.py*
%pycache_only %{python_sitelib}/__pycache__/pytest_flakes.*
%{python_sitelib}/pytest_flakes-%{version}-py*.egg-info
%changelog

View File

@ -1,35 +0,0 @@
Index: pytest-flakes-4.0.0/test_flakes.py
===================================================================
--- pytest-flakes-4.0.0.orig/test_flakes.py
+++ pytest-flakes-4.0.0/test_flakes.py
@@ -11,18 +11,18 @@ import sys
assert 'passed' not in result.stdout.str()
-def test_syntax_error(testdir):
- testdir.makeini("""
-[pytest]
-python_files=check_*.py
-""")
- testdir.makepyfile("""
-for x in []
- pass
-""")
- result = testdir.runpytest("--flakes", "--ignore", testdir)
- assert "1: invalid syntax" in result.stdout.str()
- assert 'passed' not in result.stdout.str()
+# def test_syntax_error(testdir):
+# testdir.makeini("""
+# [pytest]
+# python_files=check_*.py
+# """)
+# testdir.makepyfile("""
+# for x in []
+# pass
+# """)
+# result = testdir.runpytest("--flakes", "--ignore", testdir)
+# assert "1: invalid syntax" in result.stdout.str()
+# assert 'passed' not in result.stdout.str()
def test_noqa(testdir):

View File

@ -1,35 +0,0 @@
Index: pytest-flakes-4.0.0/tox.ini
===================================================================
--- pytest-flakes-4.0.0.orig/tox.ini
+++ pytest-flakes-4.0.0/tox.ini
@@ -5,7 +5,7 @@ envlist = py27,py34,py35,py36
usedevelop = true
deps =
pytest
- pytest-pep8
+ pytest-codestyle
coverage
commands =
coverage erase
@@ -14,6 +14,6 @@ commands =
coverage html -d htmlcov-{envname}
[pytest]
-addopts = --flakes --pep8
-pep8ignore = E501
+addopts = --flakes --codestyle
+codestyle_ignore = E501 E305 E741
norecursedirs = bin lib include Scripts .*
Index: pytest-flakes-4.0.0/pytest_flakes.py
===================================================================
--- pytest-flakes-4.0.0.orig/pytest_flakes.py
+++ pytest-flakes-4.0.0/pytest_flakes.py
@@ -97,7 +97,7 @@ class FlakesItem(pytest.Item, pytest.Fil
class Ignorer:
- def __init__(self, ignorelines, coderex=re.compile("[EW]\d\d\d")):
+ def __init__(self, ignorelines, coderex=re.compile(r"[EW]\d\d\d")):
self.ignores = ignores = []
for line in ignorelines:
i = line.find("#")