Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pytest-relaxed for
openSUSE:Factory checked in at 2023-06-03 00:06:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-relaxed (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-relaxed.new.15902 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-relaxed"
Sat Jun 3 00:06:36 2023 rev:13 rq:1090085 version:2.0.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pytest-relaxed/python-pytest-relaxed.changes
2023-04-25 16:53:29.366195326 +0200
+++
/work/SRC/openSUSE:Factory/.python-pytest-relaxed.new.15902/python-pytest-relaxed.changes
2023-06-03 00:06:43.269810895 +0200
@@ -1,0 +2,10 @@
+Wed May 31 19:43:48 UTC 2023 - Dirk Müller <[email protected]>
+
+- update to 2.0.1:
+ * Don't try loading Pytest fixture functions as if
+ they were test functions. Classifying this as a bug even
+ though it's a moderately sized change in behavior;
+ it's vanishingly unlikely anybody was relying on this
+ somehow!
+
+-------------------------------------------------------------------
Old:
----
pytest-relaxed-2.0.0.tar.gz
New:
----
pytest-relaxed-2.0.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-relaxed.spec ++++++
--- /var/tmp/diff_new_pack.r4ZX5x/_old 2023-06-03 00:06:44.365817367 +0200
+++ /var/tmp/diff_new_pack.r4ZX5x/_new 2023-06-03 00:06:44.369817390 +0200
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-pytest-relaxed
-Version: 2.0.0
+Version: 2.0.1
Release: 0
Summary: Relaxed test discovery/organization for pytest
License: BSD-2-Clause
++++++ pytest-relaxed-2.0.0.tar.gz -> pytest-relaxed-2.0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-relaxed-2.0.0/PKG-INFO
new/pytest-relaxed-2.0.1/PKG-INFO
--- old/pytest-relaxed-2.0.0/PKG-INFO 2022-12-31 23:16:47.000000000 +0100
+++ new/pytest-relaxed-2.0.1/PKG-INFO 2023-05-23 05:21:56.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: pytest-relaxed
-Version: 2.0.0
+Version: 2.0.1
Summary: Relaxed test discovery/organization for pytest
Home-page: https://pytest-relaxed.readthedocs.io/
Author: Jeff Forcier
@@ -17,6 +17,7 @@
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-relaxed-2.0.0/dev-requirements.txt
new/pytest-relaxed-2.0.1/dev-requirements.txt
--- old/pytest-relaxed-2.0.0/dev-requirements.txt 2022-12-31
23:15:23.000000000 +0100
+++ new/pytest-relaxed-2.0.1/dev-requirements.txt 2023-05-23
05:19:08.000000000 +0200
@@ -10,11 +10,9 @@
setuptools>=56.0.0
# Test coverage (see note in tasks.py::coverage)
coverage==6.2
-# CI only, but why not
-codecov==2.1.12
# Task running
invoke>=2
-invocations>=3
+invocations>=3.3
# Docs (also transitively via invocations; consider nuking again)
releases>=2
Binary files old/pytest-relaxed-2.0.0/docs/.changelog.rst.swp and
new/pytest-relaxed-2.0.1/docs/.changelog.rst.swp differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-relaxed-2.0.0/docs/changelog.rst
new/pytest-relaxed-2.0.1/docs/changelog.rst
--- old/pytest-relaxed-2.0.0/docs/changelog.rst 2022-12-31 23:16:07.000000000
+0100
+++ new/pytest-relaxed-2.0.1/docs/changelog.rst 2023-05-23 05:21:53.000000000
+0200
@@ -2,6 +2,11 @@
Changelog
=========
+- :release:`2.0.1 <2023-05-22>`
+- :bug:`9` Don't try loading Pytest fixture functions as if they were test
+ functions. Classifying this as a bug even though it's a moderately sized
+ change in behavior; it's vanishingly unlikely anybody was relying on this
+ somehow! Thanks to ``@cajopa`` for the report.
- :release:`2.0.0 <2022-12-31>`
- :bug:`- major` Prior to version 2, we failed to correctly support true Pytest
setup/teardown methods (i.e. ``setup_method`` and ``teardown_method``) and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-relaxed-2.0.0/pytest_relaxed/_version.py
new/pytest-relaxed-2.0.1/pytest_relaxed/_version.py
--- old/pytest-relaxed-2.0.0/pytest_relaxed/_version.py 2022-12-17
00:19:57.000000000 +0100
+++ new/pytest-relaxed-2.0.1/pytest_relaxed/_version.py 2023-05-23
05:21:55.000000000 +0200
@@ -1,2 +1,2 @@
-__version_info__ = (2, 0, 0)
+__version_info__ = (2, 0, 1)
__version__ = ".".join(map(str, __version_info__))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-relaxed-2.0.0/pytest_relaxed/classes.py
new/pytest-relaxed-2.0.1/pytest_relaxed/classes.py
--- old/pytest-relaxed-2.0.0/pytest_relaxed/classes.py 2022-12-18
07:12:03.000000000 +0100
+++ new/pytest-relaxed-2.0.1/pytest_relaxed/classes.py 2023-05-23
05:19:08.000000000 +0200
@@ -18,11 +18,18 @@
return not name.startswith("_")
-def istestfunction(name):
- return not (
- name.startswith("_")
- or name in ("setup", "setup_method", "teardown", "teardown_method")
+# NOTE: this is defined at top level due to a couple spots of reuse outside of
+# the mixin class itself.
+def istestfunction(obj, name):
+ is_hidden_name = name.startswith("_") or name in (
+ "setup",
+ "setup_method",
+ "teardown",
+ "teardown_method",
)
+ # TODO: is this reliable? how about __pytest_wrapped__?
+ is_fixture = hasattr(obj, "_pytestfixturefunction")
+ return not (is_hidden_name or is_fixture)
# All other classes in here currently inherit from PyCollector, and it is what
@@ -45,7 +52,7 @@
return istestclass(name)
def istestfunction(self, obj, name):
- return istestfunction(name)
+ return istestfunction(obj, name)
class SpecModule(RelaxedMixin, Module):
@@ -120,7 +127,7 @@
if isinstance(value, (types.MethodType, types.FunctionType)):
# If they look like tests, they get skipped; don't want to copy
# tests around!
- if istestfunction(name):
+ if istestfunction(obj, name):
continue
# Non-test == they're probably lifecycle methods
# (setup/teardown) or helpers (_do_thing). Rebind them to the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-relaxed-2.0.0/pytest_relaxed.egg-info/PKG-INFO
new/pytest-relaxed-2.0.1/pytest_relaxed.egg-info/PKG-INFO
--- old/pytest-relaxed-2.0.0/pytest_relaxed.egg-info/PKG-INFO 2022-12-31
23:16:47.000000000 +0100
+++ new/pytest-relaxed-2.0.1/pytest_relaxed.egg-info/PKG-INFO 2023-05-23
05:21:56.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: pytest-relaxed
-Version: 2.0.0
+Version: 2.0.1
Summary: Relaxed test discovery/organization for pytest
Home-page: https://pytest-relaxed.readthedocs.io/
Author: Jeff Forcier
@@ -17,6 +17,7 @@
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-relaxed-2.0.0/pytest_relaxed.egg-info/SOURCES.txt
new/pytest-relaxed-2.0.1/pytest_relaxed.egg-info/SOURCES.txt
--- old/pytest-relaxed-2.0.0/pytest_relaxed.egg-info/SOURCES.txt
2022-12-31 23:16:47.000000000 +0100
+++ new/pytest-relaxed-2.0.1/pytest_relaxed.egg-info/SOURCES.txt
2023-05-23 05:21:56.000000000 +0200
@@ -4,7 +4,6 @@
dev-requirements.txt
setup.py
tasks.py
-docs/.changelog.rst.swp
docs/changelog.rst
docs/conf.py
docs/index.rst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-relaxed-2.0.0/setup.py
new/pytest-relaxed-2.0.1/setup.py
--- old/pytest-relaxed-2.0.0/setup.py 2022-12-17 05:46:25.000000000 +0100
+++ new/pytest-relaxed-2.0.1/setup.py 2023-02-16 21:05:36.000000000 +0100
@@ -47,6 +47,7 @@
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-relaxed-2.0.0/tasks.py
new/pytest-relaxed-2.0.1/tasks.py
--- old/pytest-relaxed-2.0.0/tasks.py 2022-12-19 04:31:02.000000000 +0100
+++ new/pytest-relaxed-2.0.1/tasks.py 2023-05-23 05:19:08.000000000 +0200
@@ -1,5 +1,5 @@
from invoke import task, Collection
-from invocations.checks import blacken
+from invocations import checks
from invocations.packaging import release
from invocations import docs, pytest as pytests
@@ -64,5 +64,5 @@
)
-ns = Collection(blacken, coverage, docs, test, release)
+ns = Collection(checks, coverage, docs, test, release)
ns.configure({"blacken": {"find_opts": "-and -not -path './build*'"}})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-relaxed-2.0.0/tests/test_collection.py
new/pytest-relaxed-2.0.1/tests/test_collection.py
--- old/pytest-relaxed-2.0.0/tests/test_collection.py 2022-12-18
06:17:47.000000000 +0100
+++ new/pytest-relaxed-2.0.1/tests/test_collection.py 2023-05-23
05:19:08.000000000 +0200
@@ -7,7 +7,7 @@
pytest_plugins = "pytester"
-class Test_pytest_collect_file(object):
+class Test_pytest_collect_file:
def test_only_loads_dot_py_files(self, testdir):
testdir.makepyfile(
somefile="""
@@ -179,6 +179,24 @@
assert "actual test here" in stdout
assert "actual nested test here" in stdout
+ def test_skips_pytest_fixtures(self, testdir):
+ testdir.makepyfile(
+ foo="""
+ from pytest import fixture
+
+ @fixture
+ def pls_noload():
+ yield
+
+ def actual_test_here():
+ pass
+ """
+ )
+ stdout = testdir.runpytest("-v").stdout.str()
+ assert "actual test here" in stdout
+ # will be in stdout as a failure and warning if bug present
+ assert "pls_noload" not in stdout
+
def test_setup_given_inner_class_instances_when_inherited(self, testdir):
# NOTE: without this functionality in place, we still see setup()
# called on a per-test-method basis, but where 'self' is the outer
@@ -237,7 +255,7 @@
class Helper:
pass
- class NewHelper(object):
+ class NewHelper:
pass
"""
)
@@ -263,7 +281,7 @@
# explicitly reject imported classes (i.e. if we only reject funcs).
testdir.makepyfile(
_util="""
- class Callable(object):
+ class Callable:
def __call__(self):
pass
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-relaxed-2.0.0/tests/test_raises.py
new/pytest-relaxed-2.0.1/tests/test_raises.py
--- old/pytest-relaxed-2.0.0/tests/test_raises.py 2022-12-17
03:39:28.000000000 +0100
+++ new/pytest-relaxed-2.0.1/tests/test_raises.py 2023-02-16
21:05:36.000000000 +0100
@@ -11,7 +11,7 @@
pass
-class Test_raises(object):
+class Test_raises:
def test_when_given_exception_raised_no_problem(self):
@raises(Boom)
def kaboom():