Hello community,
here is the log from the commit of package python-pytest-flake8 for
openSUSE:Factory checked in at 2018-04-16 12:51:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-flake8 (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-flake8.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-flake8"
Mon Apr 16 12:51:17 2018 rev:2 rq:596766 version:1.0.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pytest-flake8/python-pytest-flake8.changes
2018-01-13 21:47:55.269309326 +0100
+++
/work/SRC/openSUSE:Factory/.python-pytest-flake8.new/python-pytest-flake8.changes
2018-04-16 12:52:01.342492369 +0200
@@ -1,0 +2,11 @@
+Sun Apr 15 18:41:27 UTC 2018 - [email protected]
+
+- specfile:
+ * update copyright year
+
+- update to version 1.0.0:
+ * Honor ignore settings in default flake8 config section; from
+ brianbruggeman@github
+ * Improve junit XML output; from Struan Judd
+
+-------------------------------------------------------------------
Old:
----
pytest-flake8-0.9.1.tar.gz
New:
----
pytest-flake8-1.0.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-flake8.spec ++++++
--- /var/tmp/diff_new_pack.JdBWLe/_old 2018-04-16 12:52:01.938470693 +0200
+++ /var/tmp/diff_new_pack.JdBWLe/_new 2018-04-16 12:52:01.942470548 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-pytest-flake8
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,25 +19,24 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without test
Name: python-pytest-flake8
-Version: 0.9.1
+Version: 1.0.0
Release: 0
Summary: Plugin for pytest to check FLAKE8 requirements
License: BSD-2-Clause
Group: Development/Languages/Python
-Url: https://github.com/tholo/pytest-flake8
+URL: https://github.com/tholo/pytest-flake8
Source:
https://files.pythonhosted.org/packages/source/p/pytest-flake8/pytest-flake8-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
+Requires: python-flake8 >= 3.0
+Requires: python-pytest >= 2.8
+BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module flake8 >= 3.0}
BuildRequires: %{python_module pytest >= 2.8}
%endif
-Requires: python-flake8 >= 3.0
-Requires: python-pytest >= 2.8
-BuildArch: noarch
-
%python_subpackages
%description
@@ -59,8 +58,8 @@
%endif
%files %{python_files}
-%defattr(-,root,root,-)
-%doc CHANGELOG LICENSE README.rst
+%license LICENSE
+%doc CHANGELOG README.rst
%{python_sitelib}/*
%changelog
++++++ pytest-flake8-0.9.1.tar.gz -> pytest-flake8-1.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flake8-0.9.1/.gitignore
new/pytest-flake8-1.0.0/.gitignore
--- old/pytest-flake8-0.9.1/.gitignore 2017-10-26 20:25:46.000000000 +0200
+++ new/pytest-flake8-1.0.0/.gitignore 2018-03-19 20:01:38.000000000 +0100
@@ -1,4 +1,5 @@
*.egg-info/
+.pytest_cache/
*.pyc
*.sublime-workspace
.cache/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flake8-0.9.1/CHANGELOG
new/pytest-flake8-1.0.0/CHANGELOG
--- old/pytest-flake8-0.9.1/CHANGELOG 2017-10-26 20:25:46.000000000 +0200
+++ new/pytest-flake8-1.0.0/CHANGELOG 2018-03-19 20:08:30.000000000 +0100
@@ -1,3 +1,10 @@
+1.0.0
+-----
+
+- Honor ignore settings in default flake8 config section; from
+ brianbruggeman@github
+- Improve junit XML output; from Struan Judd
+
0.9.1
-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flake8-0.9.1/PKG-INFO
new/pytest-flake8-1.0.0/PKG-INFO
--- old/pytest-flake8-0.9.1/PKG-INFO 2017-10-26 20:25:47.000000000 +0200
+++ new/pytest-flake8-1.0.0/PKG-INFO 2018-03-19 20:13:51.000000000 +0100
@@ -1,12 +1,11 @@
Metadata-Version: 1.1
Name: pytest-flake8
-Version: 0.9.1
+Version: 1.0.0
Summary: pytest plugin to check FLAKE8 requirements
Home-page: https://github.com/tholo/pytest-flake8
Author: Thorsten Lockert
Author-email: [email protected]
License: BSD License
-Description-Content-Type: UNKNOWN
Description: pytest plugin for efficiently checking PEP8 compliance
======================================================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flake8-0.9.1/pytest_flake8.egg-info/PKG-INFO
new/pytest-flake8-1.0.0/pytest_flake8.egg-info/PKG-INFO
--- old/pytest-flake8-0.9.1/pytest_flake8.egg-info/PKG-INFO 2017-10-26
20:25:46.000000000 +0200
+++ new/pytest-flake8-1.0.0/pytest_flake8.egg-info/PKG-INFO 2018-03-19
20:13:51.000000000 +0100
@@ -1,12 +1,11 @@
Metadata-Version: 1.1
Name: pytest-flake8
-Version: 0.9.1
+Version: 1.0.0
Summary: pytest plugin to check FLAKE8 requirements
Home-page: https://github.com/tholo/pytest-flake8
Author: Thorsten Lockert
Author-email: [email protected]
License: BSD License
-Description-Content-Type: UNKNOWN
Description: pytest plugin for efficiently checking PEP8 compliance
======================================================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flake8-0.9.1/pytest_flake8.py
new/pytest-flake8-1.0.0/pytest_flake8.py
--- old/pytest-flake8-0.9.1/pytest_flake8.py 2017-10-26 20:25:46.000000000
+0200
+++ new/pytest-flake8-1.0.0/pytest_flake8.py 2018-03-19 19:55:41.000000000
+0100
@@ -134,6 +134,9 @@
ignores = ""
return (self.fspath, -1, "FLAKE8-check%s" % ignores)
+ def _makeid(self):
+ return super(Flake8Item, self)._makeid() + "::FLAKE8"
+
class Ignorer:
def __init__(self, ignorelines, coderex=re.compile("[EW]\d\d\d")):
@@ -183,7 +186,8 @@
app.find_plugins()
app.register_plugin_options()
app.parse_configuration_and_cli(args)
- app.options.ignore.extend(flake8ignore)
+ if flake8ignore:
+ app.options.ignore = flake8ignore
app.make_formatter() # fix this
app.make_notifier()
app.make_guide()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flake8-0.9.1/setup.py
new/pytest-flake8-1.0.0/setup.py
--- old/pytest-flake8-0.9.1/setup.py 2017-10-26 20:25:46.000000000 +0200
+++ new/pytest-flake8-1.0.0/setup.py 2018-03-19 20:08:44.000000000 +0100
@@ -6,7 +6,7 @@
setup(
name='pytest-flake8',
- version='0.9.1',
+ version='1.0.0',
description='pytest plugin to check FLAKE8 requirements',
long_description=open("README.rst").read(),
classifiers=[
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flake8-0.9.1/test_flake8.py
new/pytest-flake8-1.0.0/test_flake8.py
--- old/pytest-flake8-0.9.1/test_flake8.py 2017-10-26 20:25:46.000000000
+0200
+++ new/pytest-flake8-1.0.0/test_flake8.py 2018-03-19 20:00:55.000000000
+0100
@@ -1,6 +1,6 @@
# coding=utf8
-
"""Unit tests for flake8 pytest plugin."""
+from __future__ import print_function
import py
import pytest
@@ -22,6 +22,8 @@
def example(self, request):
"""Create a test file."""
testdir = request.getfuncargvalue("testdir")
+ import sys
+ print(testdir, file=sys.stderr)
p = testdir.makepyfile("")
p.write("class AClass:\n pass\n \n\n# too many spaces")
return p
@@ -35,10 +37,31 @@
assert ign(tmpdir.join("a/y.py")) == "E203 E300".split()
assert ign(tmpdir.join("a/z.py")) is None
+ def test_default_flake8_ignores(self, testdir):
+ testdir.makeini("""
+ [pytest]
+ markers = flake8
+
+ [flake8]
+ ignore = E203
+ *.py E300
+ tests/*.py ALL E203 # something
+ """)
+ testdir.tmpdir.ensure("xy.py")
+ testdir.tmpdir.ensure("tests/hello.py")
+ result = testdir.runpytest("--flake8", "-s")
+ assert result.ret == 0
+ result.stdout.fnmatch_lines([
+ "*collected 2*",
+ "*xy.py .*",
+ "*2 passed*",
+ ])
+
def test_ignores_all(self, testdir):
"""Verify success when all errors are ignored."""
testdir.makeini("""
[pytest]
+ markers = flake8
flake8-ignore = E203
*.py E300
tests/*.py ALL E203 # something
@@ -46,7 +69,7 @@
testdir.tmpdir.ensure("xy.py")
testdir.tmpdir.ensure("tests/hello.py")
result = testdir.runpytest("--flake8", "-s")
- assert result.ret == 0
+ result.assert_outcomes(passed=1)
result.stdout.fnmatch_lines([
"*collected 1*",
"*xy.py .*",
@@ -60,7 +83,7 @@
"*W293*",
"*W292*",
])
- assert result.ret != 0
+ result.assert_outcomes(failed=1)
def test_mtime_caching(self, testdir, example):
testdir.tmpdir.ensure("hello.py")
@@ -69,28 +92,27 @@
# "*plugins*flake8*",
"*W293*",
"*W292*",
- "*1 failed*",
])
- assert result.ret != 0
+ result.assert_outcomes(passed=1, failed=1)
result = testdir.runpytest("--flake8", )
result.stdout.fnmatch_lines([
"*W293*",
"*W292*",
- "*1 failed*",
])
+ result.assert_outcomes(skipped=1, failed=1)
testdir.makeini("""
[pytest]
+ markers = flake8
flake8-ignore = *.py W293 W292
""")
result = testdir.runpytest("--flake8", )
- result.stdout.fnmatch_lines([
- "*2 passed*",
- ])
+ result.assert_outcomes(passed=2)
def test_extensions(testdir):
testdir.makeini("""
[pytest]
+ markers = flake8
flake8-extensions = .py .pyx
""")
testdir.makefile(".pyx", """
@@ -102,6 +124,7 @@
result.stdout.fnmatch_lines([
"*collected 1*",
])
+ result.assert_outcomes(failed=1)
def test_ok_verbose(testdir):
@@ -114,7 +137,7 @@
result.stdout.fnmatch_lines([
"*test_ok_verbose*",
])
- assert result.ret == 0
+ result.assert_outcomes(passed=1)
def test_keyword_match(testdir):
@@ -128,7 +151,7 @@
"*E201*",
"*1 failed*",
])
- assert 'passed' not in result.stdout.str()
+ result.assert_outcomes(failed=1)
@pytest.mark.xfail("sys.platform == 'win32'")
@@ -148,7 +171,18 @@
# result.stdout.fnmatch_lines("*non-ascii comment*")
[email protected](reason="flake8 is not properly registered as a marker")
def test_strict(testdir):
testdir.makepyfile("")
- result = testdir.runpytest("--strict", "--flake8")
+ result = testdir.runpytest("--strict", "--mflake8")
+ result.assert_outcomes(passed=1)
+
+
+def test_junit_classname(testdir):
+ testdir.makepyfile("")
+ result = testdir.runpytest("--flake8", "--junit-xml=TEST.xml")
+ junit = testdir.tmpdir.join("TEST.xml")
+ with open(str(junit)) as j_file:
+ j_text = j_file.read()
assert result.ret == 0
+ assert 'classname=""' not in j_text
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flake8-0.9.1/tox.ini
new/pytest-flake8-1.0.0/tox.ini
--- old/pytest-flake8-0.9.1/tox.ini 2017-10-26 20:25:46.000000000 +0200
+++ new/pytest-flake8-1.0.0/tox.ini 2018-03-19 19:55:41.000000000 +0100
@@ -12,10 +12,12 @@
[testenv:py-xdist]
basepython=python
deps={[testenv]deps}
- pytest-xdist
+ pytest-xdist
commands=
pytest -n3 --junitxml={envlogdir}/junit-{envname}.xml {posargs}
[pytest]
addopts=--flake8
-flake8-ignore = E128
+
+[flake8]
+ignore = E128