Hello community,

here is the log from the commit of package python-pytest-freezegun for 
openSUSE:Factory checked in at 2020-08-25 12:40:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-freezegun (Old)
 and      /work/SRC/openSUSE:Factory/.python-pytest-freezegun.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pytest-freezegun"

Tue Aug 25 12:40:51 2020 rev:2 rq:828604 version:0.4.2

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-pytest-freezegun/python-pytest-freezegun.changes
  2020-03-11 18:56:18.335700615 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-pytest-freezegun.new.3399/python-pytest-freezegun.changes
        2020-08-25 12:40:59.561439636 +0200
@@ -1,0 +2,10 @@
+Fri Aug 21 15:01:49 UTC 2020 - Marketa Calabkova <[email protected]>
+
+- Update to version 0.4.2
+  * Work with pre-release pytest versions, by 
[chandlernine](https://github.com/chandlernine), 
+    with a different implementation proposed by [Aly 
Sivji](https://github.com/alysivji).
+  * Marking a test with `freeze_time` should freeze time in fixtures, even if 
the `freezer` 
+    fixture is also used explicitly late in the fixture list. Thanks to 
+    [Christian Grossmüller](https://github.com/chgad) for pointing out the 
problem.
+
+-------------------------------------------------------------------

Old:
----
  0.4.1.tar.gz

New:
----
  0.4.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pytest-freezegun.spec ++++++
--- /var/tmp/diff_new_pack.FeFZlr/_old  2020-08-25 12:41:00.289439773 +0200
+++ /var/tmp/diff_new_pack.FeFZlr/_new  2020-08-25 12:41:00.293439774 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pytest-freezegun
 #
-# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
+# 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
@@ -12,32 +12,31 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
+#
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define skip_python2 1
 Name:           python-pytest-freezegun
-Version:        0.4.1
+Version:        0.4.2
 Release:        0
-License:        MIT
 Summary:        Fixtures in freeze_time
-Url:            https://github.com/ktosiek/pytest-freezegun
+License:        MIT
 Group:          Development/Languages/Python
-#Source:         
https://files.pythonhosted.org/packages/source/p/pytest-freezegun/pytest-freezegun-%{version}.zip
+URL:            https://github.com/ktosiek/pytest-freezegun
 Source:         
https://github.com/ktosiek/pytest-freezegun/archive/%{version}.tar.gz
-BuildRequires:  python-rpm-macros
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module setuptools}
-# SECTION test requirements
-BuildRequires:  %{python_module freezegun > 0.3}
-BuildRequires:  %{python_module pytest >= 3.0.0}
-# /SECTION
-BuildRequires:  unzip
 BuildRequires:  fdupes
+BuildRequires:  python-rpm-macros
 Requires:       python-freezegun > 0.3
 Requires:       python-pytest >= 3.0.0
 BuildArch:      noarch
-
+# SECTION test requirements
+BuildRequires:  %{python_module freezegun > 0.3}
+BuildRequires:  %{python_module pytest >= 3.0.0}
+# /SECTION
 %python_subpackages
 
 %description

++++++ 0.4.1.tar.gz -> 0.4.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-freezegun-0.4.1/.travis.yml 
new/pytest-freezegun-0.4.2/.travis.yml
--- old/pytest-freezegun-0.4.1/.travis.yml      2020-02-02 20:33:39.000000000 
+0100
+++ new/pytest-freezegun-0.4.2/.travis.yml      2020-07-19 19:42:01.000000000 
+0200
@@ -1,6 +1,6 @@
 # Config file for automatic testing at travis-ci.org
 
-sudo: false
+dist: bionic
 language: python
 python:
   - "3.5"
@@ -13,6 +13,12 @@
 - TOX_SUFFIX=pt4
 - TOX_SUFFIX=pt5
 
+jobs:
+  include:
+    - env: TOX_SUFFIX=py38-ptNext-fgNext
+  allow_failures:
+    - env: TOX_SUFFIX=py38-ptNext-fgNext
+
 install:
   # coveralls-python needs a newer setuptools to install from git
   - "[[ $TRAVIS_PYTHON_VERSION == pypy3 ]] || pip install --upgrade setuptools 
pip"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-freezegun-0.4.1/CHANGELOG.md 
new/pytest-freezegun-0.4.2/CHANGELOG.md
--- old/pytest-freezegun-0.4.1/CHANGELOG.md     2020-02-02 20:33:39.000000000 
+0100
+++ new/pytest-freezegun-0.4.2/CHANGELOG.md     2020-07-19 19:42:01.000000000 
+0200
@@ -4,7 +4,12 @@
 The format is based on [Keep a 
Changelog](https://keepachangelog.com/en/1.0.0/),
 and this project adheres to [Semantic 
Versioning](https://semver.org/spec/v2.0.0.html).
 
-## [0.4.0] - 2020-02-02
+## [0.4.2] - 2020-07-19
+### Fixed
+- Work with pre-release pytest versions, by 
[chandlernine](https://github.com/chandlernine), with a different 
implementation proposed by [Aly Sivji](https://github.com/alysivji).
+- Marking a test with `freeze_time` should freeze time in fixtures, even if 
the `freezer` fixture is also used explicitly late in the fixture list. Thanks 
to [Christian Grossmüller](https://github.com/chgad) for pointing out the 
problem.
+
+## [0.4.1] - 2020-02-02
 ### Added
 - Support for class-based tests, by [Richard Terry](https://github.com/radiac).
 - Registering the `freeze_time` mark, thanks to [Dima 
Tisnek](https://github.com/dimaqq), [Craig Anderson](https://github.com/craiga) 
and [Richard Terry](https://github.com/radiac). This was in really high demand. 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-freezegun-0.4.1/pytest_freezegun.py 
new/pytest-freezegun-0.4.2/pytest_freezegun.py
--- old/pytest-freezegun-0.4.1/pytest_freezegun.py      2020-02-02 
20:33:39.000000000 +0100
+++ new/pytest-freezegun-0.4.2/pytest_freezegun.py      2020-07-19 
19:42:01.000000000 +0200
@@ -2,10 +2,10 @@
 
 import pytest
 
+from distutils.version import LooseVersion
 from freezegun import freeze_time
 
 
-PYTEST_VERSION = tuple(int(part) for part in pytest.__version__.split('.'))
 MARKER_NAME = 'freeze_time'
 FIXTURE_NAME = 'freezer'
 
@@ -14,7 +14,7 @@
     """
     Get our marker, regardless of pytest version
     """
-    if PYTEST_VERSION < (3, 6, 0):
+    if LooseVersion(pytest.__version__) < LooseVersion('3.6.0'):
         return node.get_marker('freeze_time')
     else:
         return node.get_closest_marker('freeze_time')
@@ -52,10 +52,7 @@
     Inject our fixture into any tests with our marker
     """
     for item in items:
-        if (
-            get_closest_marker(item, MARKER_NAME)
-            and FIXTURE_NAME not in item.fixturenames
-        ):
+        if get_closest_marker(item, MARKER_NAME):
             item.fixturenames.insert(0, FIXTURE_NAME)
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-freezegun-0.4.1/setup.cfg 
new/pytest-freezegun-0.4.2/setup.cfg
--- old/pytest-freezegun-0.4.1/setup.cfg        2020-02-02 20:33:39.000000000 
+0100
+++ new/pytest-freezegun-0.4.2/setup.cfg        2020-07-19 19:42:01.000000000 
+0200
@@ -1,6 +1,6 @@
 [metadata]
 name = pytest-freezegun
-version = 0.4.1
+version = 0.4.2
 description = Wrap tests with fixtures in freeze_time
 long_description = file:README.rst
 author = Tomasz Kontusz
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-freezegun-0.4.1/tests/test_freezegun.py 
new/pytest-freezegun-0.4.2/tests/test_freezegun.py
--- old/pytest-freezegun-0.4.1/tests/test_freezegun.py  2020-02-02 
20:33:39.000000000 +0100
+++ new/pytest-freezegun-0.4.2/tests/test_freezegun.py  2020-07-19 
19:42:01.000000000 +0200
@@ -36,6 +36,25 @@
     assert result.ret == 0
 
 
+def test_freezing_time_with_mark_and_fixture_used_by_test(testdir):
+    # https://github.com/ktosiek/pytest-freezegun/issues/24
+    testdir.makepyfile("""
+        import pytest
+        from datetime import date, datetime
+
+        @pytest.fixture
+        def today():
+            return datetime.now().date()
+
+        @pytest.mark.freeze_time('2017-05-20 15:42')
+        def test_sth(today, freezer):
+            assert today == date(2017, 5, 20)
+    """)
+
+    result = testdir.runpytest('-v', '-s')
+    assert result.ret == 0
+
+
 def test_no_mark(testdir):
     testdir.makepyfile("""
         import datetime
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-freezegun-0.4.1/tox.ini 
new/pytest-freezegun-0.4.2/tox.ini
--- old/pytest-freezegun-0.4.1/tox.ini  2020-02-02 20:33:39.000000000 +0100
+++ new/pytest-freezegun-0.4.2/tox.ini  2020-07-19 19:42:01.000000000 +0200
@@ -1,6 +1,6 @@
 # For more information about tox, see https://tox.readthedocs.io/en/latest/
 [tox]
-envlist = {py35,py36,py37,py38,pypy3}-{pt3,pt4,pt5},flake8
+envlist = {py35,py36,py37,py38,pypy3}-{pt3,pt4,pt5},py38-ptNext-fgNext,flake8
 
 [testenv]
 deps =
@@ -9,6 +9,8 @@
   pt3: pytest>=3,<4
   pt4: pytest>=4,<5
   pt5: pytest>=5,<6
+  ptNext: git+https://github.com/pytest-dev/pytest/
+  fgNext: git+https://github.com/spulec/freezegun/
 commands = coverage run -p -m pytest tests/ {posargs}
 
 [testenv:flake8]


Reply via email to