Hello community,
here is the log from the commit of package python-pytest-lazy-fixture for
openSUSE:Factory checked in at 2020-02-20 14:58:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-lazy-fixture (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-lazy-fixture.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-lazy-fixture"
Thu Feb 20 14:58:32 2020 rev:4 rq:777571 version:0.6.3
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pytest-lazy-fixture/python-pytest-lazy-fixture.changes
2019-12-04 14:21:13.770481099 +0100
+++
/work/SRC/openSUSE:Factory/.python-pytest-lazy-fixture.new.26092/python-pytest-lazy-fixture.changes
2020-02-20 14:58:38.102671234 +0100
@@ -1,0 +2,6 @@
+Thu Feb 20 07:16:11 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Update to 0.6.3:
+ * no changelog
+
+-------------------------------------------------------------------
Old:
----
pytest-lazy-fixture-0.6.2.tar.gz
New:
----
pytest-lazy-fixture-0.6.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-lazy-fixture.spec ++++++
--- /var/tmp/diff_new_pack.SFJPWn/_old 2020-02-20 14:58:38.894672788 +0100
+++ /var/tmp/diff_new_pack.SFJPWn/_new 2020-02-20 14:58:38.898672797 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-pytest-lazy-fixture
#
-# 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,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytest-lazy-fixture
-Version: 0.6.2
+Version: 0.6.3
Release: 0
Summary: Helper to use fixtures in pytest.markparametrize
License: MIT
++++++ pytest-lazy-fixture-0.6.2.tar.gz -> pytest-lazy-fixture-0.6.3.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-lazy-fixture-0.6.2/PKG-INFO
new/pytest-lazy-fixture-0.6.3/PKG-INFO
--- old/pytest-lazy-fixture-0.6.2/PKG-INFO 2019-11-20 11:50:10.000000000
+0100
+++ new/pytest-lazy-fixture-0.6.3/PKG-INFO 2020-02-01 19:02:02.000000000
+0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: pytest-lazy-fixture
-Version: 0.6.2
+Version: 0.6.3
Summary: It helps to use fixtures in pytest.mark.parametrize
Home-page: https://github.com/tvorog/pytest-lazy-fixture
Author: Marsel Zaripov
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-lazy-fixture-0.6.2/pytest_lazy_fixture.egg-info/PKG-INFO
new/pytest-lazy-fixture-0.6.3/pytest_lazy_fixture.egg-info/PKG-INFO
--- old/pytest-lazy-fixture-0.6.2/pytest_lazy_fixture.egg-info/PKG-INFO
2019-11-20 11:50:10.000000000 +0100
+++ new/pytest-lazy-fixture-0.6.3/pytest_lazy_fixture.egg-info/PKG-INFO
2020-02-01 19:02:02.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: pytest-lazy-fixture
-Version: 0.6.2
+Version: 0.6.3
Summary: It helps to use fixtures in pytest.mark.parametrize
Home-page: https://github.com/tvorog/pytest-lazy-fixture
Author: Marsel Zaripov
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-lazy-fixture-0.6.2/pytest_lazyfixture.py
new/pytest-lazy-fixture-0.6.3/pytest_lazyfixture.py
--- old/pytest-lazy-fixture-0.6.2/pytest_lazyfixture.py 2019-11-20
11:46:04.000000000 +0100
+++ new/pytest-lazy-fixture-0.6.3/pytest_lazyfixture.py 2020-02-01
18:28:55.000000000 +0100
@@ -62,6 +62,11 @@
current_node = None
+def pytest_make_parametrize_id(config, val, argname):
+ if is_lazy_fixture(val):
+ return val.name
+
+
@pytest.hookimpl(hookwrapper=True)
def pytest_generate_tests(metafunc):
yield
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-lazy-fixture-0.6.2/setup.py
new/pytest-lazy-fixture-0.6.3/setup.py
--- old/pytest-lazy-fixture-0.6.2/setup.py 2019-11-20 11:47:16.000000000
+0100
+++ new/pytest-lazy-fixture-0.6.3/setup.py 2020-02-01 18:54:44.000000000
+0100
@@ -13,7 +13,7 @@
setup(
name='pytest-lazy-fixture',
- version='0.6.2',
+ version='0.6.3',
author='Marsel Zaripov',
author_email='[email protected]',
maintainer='Marsel Zaripov',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-lazy-fixture-0.6.2/tests/test_lazyfixture.py
new/pytest-lazy-fixture-0.6.3/tests/test_lazyfixture.py
--- old/pytest-lazy-fixture-0.6.2/tests/test_lazyfixture.py 2019-11-20
11:11:06.000000000 +0100
+++ new/pytest-lazy-fixture-0.6.3/tests/test_lazyfixture.py 2020-02-01
18:45:05.000000000 +0100
@@ -878,3 +878,29 @@
""")
result = testdir.inline_run('-s')
result.assertoutcome(passed=2)
+
+
+# https://github.com/TvoroG/pytest-lazy-fixture/issues/46
+def test_lazy_fixture_ids(testdir):
+ testdir.makepyfile("""
+ import pytest
+ from pytest_lazyfixture import lazy_fixture
+
+ @pytest.fixture()
+ def foo():
+ return "foo"
+
+ @pytest.fixture(params=['spam', 'eggs'])
+ def bar(request):
+ return "bar-{}".format(request.param)
+
+ @pytest.mark.parametrize("data", [lazy_fixture("foo"),
+ lazy_fixture("bar")])
+ def test_the_thing(data):
+ assert False
+ """)
+ result = testdir.runpytest('--collect-only')
+ stdout = result.stdout.str()
+ assert 'test_the_thing[foo]' in stdout
+ assert 'test_the_thing[bar-spam]' in stdout
+ assert 'test_the_thing[bar-eggs]' in stdout