Hello community,
here is the log from the commit of package python-pytest-sugar for
openSUSE:Factory checked in at 2020-11-06 23:44:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-sugar (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-sugar.new.11331 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-sugar"
Fri Nov 6 23:44:52 2020 rev:7 rq:846345 version:0.9.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pytest-sugar/python-pytest-sugar.changes
2020-05-01 11:06:03.202894935 +0200
+++
/work/SRC/openSUSE:Factory/.python-pytest-sugar.new.11331/python-pytest-sugar.changes
2020-11-06 23:45:15.887244596 +0100
@@ -1,0 +2,8 @@
+Thu Nov 5 14:51:01 UTC 2020 - Marketa Machova <[email protected]>
+
+- update to 0.9.4
+ * Fix pytest-sugar 0.9.3 incompatible with pytest 5.4 (thanks @nicoddemus)
+ * Fix Tests fail with pytest 3.5.0 DOCTESTS (^)
+ * Fix Tests fail with pytest 5.x (^)
+
+-------------------------------------------------------------------
Old:
----
pytest-sugar-0.9.3.tar.gz
New:
----
pytest-sugar-0.9.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-sugar.spec ++++++
--- /var/tmp/diff_new_pack.ZZfL16/_old 2020-11-06 23:45:16.523243373 +0100
+++ /var/tmp/diff_new_pack.ZZfL16/_new 2020-11-06 23:45:16.531243358 +0100
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytest-sugar
-Version: 0.9.3
+Version: 0.9.4
Release: 0
Summary: Pretty printer for pytest progress
License: BSD-3-Clause
@@ -48,9 +48,7 @@
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-# test_item_count_after_pytest_collection_modifyitems -
https://github.com/Frozenball/pytest-sugar/issues/180
-# test_doctest - same as above
-%pytest -k 'not test_item_count_after_pytest_collection_modifyitems and not
test_doctest'
+%pytest
%files %{python_files}
%license LICENSE
++++++ pytest-sugar-0.9.3.tar.gz -> pytest-sugar-0.9.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-sugar-0.9.3/CHANGES.rst
new/pytest-sugar-0.9.4/CHANGES.rst
--- old/pytest-sugar-0.9.3/CHANGES.rst 2020-04-26 15:31:38.000000000 +0200
+++ new/pytest-sugar-0.9.4/CHANGES.rst 2020-07-06 20:38:26.000000000 +0200
@@ -3,6 +3,13 @@
A list of changes between each release.
+0.9.4 (2020-07-06)
+^^^^^^^^^^^^^^^^^^^
+
+- Fix pytest-sugar 0.9.3 incompatible with pytest 5.4 (thanks @nicoddemus)
+- Fix Tests fail with pytest 3.5.0 DOCTESTS (^)
+- Fix Tests fail with pytest 5.x (^)
+
0.9.3 (2020-04-26)
^^^^^^^^^^^^^^^^^^^
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-sugar-0.9.3/PKG-INFO
new/pytest-sugar-0.9.4/PKG-INFO
--- old/pytest-sugar-0.9.3/PKG-INFO 2020-04-26 15:32:40.000000000 +0200
+++ new/pytest-sugar-0.9.4/PKG-INFO 2020-07-06 20:39:17.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pytest-sugar
-Version: 0.9.3
+Version: 0.9.4
Summary: pytest-sugar is a plugin for pytest that changes the default look and
feel of pytest (e.g. progressbar, show tests that fail instantly).
Home-page: http://pivotfinland.com/pytest-sugar/
Author: Teemu, Janne Vanhala and others
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-sugar-0.9.3/pytest_sugar.egg-info/PKG-INFO
new/pytest-sugar-0.9.4/pytest_sugar.egg-info/PKG-INFO
--- old/pytest-sugar-0.9.3/pytest_sugar.egg-info/PKG-INFO 2020-04-26
15:32:40.000000000 +0200
+++ new/pytest-sugar-0.9.4/pytest_sugar.egg-info/PKG-INFO 2020-07-06
20:39:17.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pytest-sugar
-Version: 0.9.3
+Version: 0.9.4
Summary: pytest-sugar is a plugin for pytest that changes the default look and
feel of pytest (e.g. progressbar, show tests that fail instantly).
Home-page: http://pivotfinland.com/pytest-sugar/
Author: Teemu, Janne Vanhala and others
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-sugar-0.9.3/pytest_sugar.py
new/pytest-sugar-0.9.4/pytest_sugar.py
--- old/pytest-sugar-0.9.3/pytest_sugar.py 2020-04-26 15:31:18.000000000
+0200
+++ new/pytest-sugar-0.9.4/pytest_sugar.py 2020-07-06 20:36:24.000000000
+0200
@@ -28,7 +28,7 @@
from _pytest.terminal import TerminalReporter
-__version__ = '0.9.3'
+__version__ = '0.9.4'
LEN_RIGHT_MARGIN = 0
LEN_PROGRESS_PERCENTAGE = 5
@@ -64,8 +64,8 @@
]
-def flatten(l):
- for x in l:
+def flatten(seq):
+ for x in seq:
if isinstance(x, (list, tuple)):
for y in flatten(x):
yield y
@@ -238,6 +238,7 @@
self.print_failure(report)
def pytest_sessionstart(self, session):
+ self._session = session
self._sessionstarttime = py.std.time.time()
verinfo = ".".join(map(str, sys.version_info[:3]))
self.write_line(
@@ -530,14 +531,7 @@
else:
path = os.path.dirname(report.location[0])
name = os.path.basename(report.location[0])
- # Doctest failure reports have lineno=None at least up to
- # pytest==3.0.7, but it is available via longrepr object.
- try:
- lineno = report.longrepr.reprlocation.lineno
- except AttributeError:
- lineno = report.location[1]
- if lineno is not None:
- lineno += 1
+ lineno = self._get_lineno_from_report(report)
crashline = '%s%s%s:%s %s' % (
colored(path, THEME['path']),
'/' if path else '',
@@ -594,6 +588,24 @@
return crashline
+ def _get_lineno_from_report(self, report):
+ # Doctest failures in pytest>3.10 are stored in
+ # reprlocation_lines, a list of (ReprFileLocation, lines)
+ try:
+ location, lines = report.longrepr.reprlocation_lines[0]
+ return location.lineno
+ except AttributeError:
+ pass
+ # Doctest failure reports have lineno=None at least up to
+ # pytest==3.0.7, but it is available via longrepr object.
+ try:
+ return report.longrepr.reprlocation.lineno
+ except AttributeError:
+ lineno = report.location[1]
+ if lineno is not None:
+ lineno += 1
+ return lineno
+
def summary_failures(self):
# Prevent failure summary from being shown since we already
# show the failure instantly after failure has occurred.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-sugar-0.9.3/test_sugar.py
new/pytest-sugar-0.9.4/test_sugar.py
--- old/pytest-sugar-0.9.3/test_sugar.py 2020-04-26 15:25:49.000000000
+0200
+++ new/pytest-sugar-0.9.4/test_sugar.py 2020-07-06 20:35:17.000000000
+0200
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
import pytest
import re
-from distutils.version import LooseVersion
from pytest_sugar import strip_colors
pytest_plugins = "pytester"
@@ -551,10 +550,6 @@
assert result.ret == 1, result.stderr.str()
- @pytest.mark.skipif(
- LooseVersion(pytest.__version__) >= LooseVersion('3.5'),
- reason='Temporarily skipping until #134'
- )
def test_doctest_lineno(self, testdir):
""" Test location reported for doctest-modules """