Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pytest-check for
openSUSE:Factory checked in at 2024-01-05 21:45:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-check (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-check.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-check"
Fri Jan 5 21:45:50 2024 rev:5 rq:1137114 version:2.2.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pytest-check/python-pytest-check.changes
2023-10-05 20:03:50.272197292 +0200
+++
/work/SRC/openSUSE:Factory/.python-pytest-check.new.28375/python-pytest-check.changes
2024-01-05 21:47:13.635041959 +0100
@@ -1,0 +2,6 @@
+Fri Jan 5 17:11:17 UTC 2024 - Dirk Müller <[email protected]>
+
+- update to 2.2.3:
+ * Check failure info now shows up in summaries.
+
+-------------------------------------------------------------------
Old:
----
pytest_check-2.2.2.tar.gz
New:
----
pytest_check-2.2.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-check.spec ++++++
--- /var/tmp/diff_new_pack.08HUW9/_old 2024-01-05 21:47:14.335067577 +0100
+++ /var/tmp/diff_new_pack.08HUW9/_new 2024-01-05 21:47:14.335067577 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-pytest-check
#
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-pytest-check
-Version: 2.2.2
+Version: 2.2.3
Release: 0
Summary: A pytest plugin that allows multiple failures per test
License: MIT
++++++ pytest_check-2.2.2.tar.gz -> pytest_check-2.2.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_check-2.2.2/PKG-INFO
new/pytest_check-2.2.3/PKG-INFO
--- old/pytest_check-2.2.2/PKG-INFO 1970-01-01 01:00:00.000000000 +0100
+++ new/pytest_check-2.2.3/PKG-INFO 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: pytest-check
-Version: 2.2.2
+Version: 2.2.3
Summary: A pytest plugin that allows multiple failures per test.
Author: Brian Okken
Requires-Python: >=3.7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_check-2.2.2/changelog.md
new/pytest_check-2.2.3/changelog.md
--- old/pytest_check-2.2.2/changelog.md 2023-09-22 10:39:17.265202000 +0200
+++ new/pytest_check-2.2.3/changelog.md 2023-12-31 23:23:30.590064000 +0100
@@ -20,11 +20,16 @@
-->
+## [2.2.3] - 2023-Dec-31
+
+- Check failure info now shows up in summaries.
+- fix [133](https://github.com/okken/pytest-check/issues/133) - thanks
[hirotoKirimaru](https://github.com/hirotoKirimaru)
+
## [2.2.2] - 2023-Sept-22
### fixed
-- Issue #7
+- Fix [137](https://github.com/okken/pytest-check/issues/137)
## [2.2.1] - 2023-Aug-11
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_check-2.2.2/examples/test_example_summary.py
new/pytest_check-2.2.3/examples/test_example_summary.py
--- old/pytest_check-2.2.2/examples/test_example_summary.py 1970-01-01
01:00:00.000000000 +0100
+++ new/pytest_check-2.2.3/examples/test_example_summary.py 2023-12-31
23:23:30.594064000 +0100
@@ -0,0 +1,20 @@
+from pytest_check import check
+
+def test_assert_no_msg():
+ a, b = 1, 2
+ assert a == b
+
+
+def test_assert_msg():
+ a, b = 1, 2
+ assert a == b, f"comment about a={a} != b={b}"
+
+
+def test_check_no_msg():
+ a, b = 1, 2
+ check.equal(a, b)
+
+
+def test_check_msg():
+ a, b = 1, 2
+ check.equal(a, b, f"comment about a={a} != b={b}")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_check-2.2.2/pyproject.toml
new/pytest_check-2.2.3/pyproject.toml
--- old/pytest_check-2.2.2/pyproject.toml 2023-09-22 10:39:17.269202000
+0200
+++ new/pytest_check-2.2.3/pyproject.toml 2023-12-31 23:23:30.594064000
+0100
@@ -4,7 +4,7 @@
readme = "README.md"
license = {file = "LICENSE.txt"}
description="A pytest plugin that allows multiple failures per test."
-version = "2.2.2"
+version = "2.2.3"
requires-python = ">=3.7"
classifiers = [
"License :: OSI Approved :: MIT License",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_check-2.2.2/src/pytest_check/plugin.py
new/pytest_check-2.2.3/src/pytest_check/plugin.py
--- old/pytest_check-2.2.2/src/pytest_check/plugin.py 2023-09-22
10:39:17.269202000 +0200
+++ new/pytest_check-2.2.3/src/pytest_check/plugin.py 2023-12-31
23:23:30.594064000 +0100
@@ -3,6 +3,8 @@
import pytest
from _pytest._code.code import ExceptionInfo
from _pytest.skipping import xfailed_key
+from _pytest.reports import ExceptionChainRepr
+from _pytest._code.code import ExceptionRepr, ReprFileLocation
from . import check_log, check_raises, context_manager, pseudo_traceback
@@ -36,8 +38,17 @@
report.outcome = "failed"
try:
raise AssertionError(report.longrepr)
- except AssertionError:
+ except AssertionError as e:
excinfo = ExceptionInfo.from_current()
+ e_str = str(e)
+ # will be 5 with color, 0 without
+ if e_str.find('FAILURE: ') in (0, 5):
+ e_str = e_str.split('FAILURE: ')[1]
+ reprcrash = ReprFileLocation(item.nodeid, 0, e_str)
+ reprtraceback = ExceptionRepr(reprcrash, excinfo)
+ chain_repr = ExceptionChainRepr([(reprtraceback, reprcrash,
str(e))])
+ report.longrepr = chain_repr
+
call.excinfo = excinfo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_check-2.2.2/tests/test_summary.py
new/pytest_check-2.2.3/tests/test_summary.py
--- old/pytest_check-2.2.2/tests/test_summary.py 1970-01-01
01:00:00.000000000 +0100
+++ new/pytest_check-2.2.3/tests/test_summary.py 2023-12-31
23:23:30.594064000 +0100
@@ -0,0 +1,10 @@
+def test_baseline(pytester):
+ pytester.copy_example("examples/test_example_summary.py")
+ result = pytester.runpytest("-k check_no_msg")
+ result.stdout.fnmatch_lines(["*FAILED*-*check 1 == 2*"])
+
+
+def test_message(pytester):
+ pytester.copy_example("examples/test_example_summary.py")
+ result = pytester.runpytest("-k check_msg")
+ result.stdout.fnmatch_lines(["*FAILED*-*check 1 == 2*comment about*"])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_check-2.2.2/tox.ini
new/pytest_check-2.2.3/tox.ini
--- old/pytest_check-2.2.2/tox.ini 2023-09-22 10:39:17.269202000 +0200
+++ new/pytest_check-2.2.3/tox.ini 2023-12-31 23:23:30.598064200 +0100
@@ -9,13 +9,6 @@
package = wheel
wheel_build_env = .pkg
-; there's a weird thing going on with 3.12b2, pip, and pytest
-[testenv:py312]
-ignore_outcome = true
-basepython = python3.12
-commands = pytest {posargs}
-description = Run pytest
-
[testenv:coverage]
deps = coverage
basepython = python3.11