Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-cachy for openSUSE:Factory checked in at 2023-11-30 22:00:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-cachy (Old) and /work/SRC/openSUSE:Factory/.python-cachy.new.25432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-cachy" Thu Nov 30 22:00:47 2023 rev:6 rq:1129799 version:0.3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-cachy/python-cachy.changes 2023-05-08 17:24:41.656840776 +0200 +++ /work/SRC/openSUSE:Factory/.python-cachy.new.25432/python-cachy.changes 2023-11-30 22:01:35.693664620 +0100 @@ -1,0 +2,6 @@ +Wed Nov 29 12:32:31 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com> + +- Add upstream patch flexmock-0.11.patch to make tests work with + latest version of python-flexmock gh#sdispater/cachy#19 + +------------------------------------------------------------------- New: ---- flexmock-0.11.patch BETA DEBUG BEGIN: New: - Add upstream patch flexmock-0.11.patch to make tests work with latest version of python-flexmock gh#sdispater/cachy#19 BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-cachy.spec ++++++ --- /var/tmp/diff_new_pack.021LHb/_old 2023-11-30 22:01:36.333688198 +0100 +++ /var/tmp/diff_new_pack.021LHb/_new 2023-11-30 22:01:36.337688345 +0100 @@ -25,6 +25,8 @@ URL: https://github.com/sdispater/cachy Source: https://files.pythonhosted.org/packages/source/c/cachy/cachy-%{version}.tar.gz Patch0: support-pymemcache.patch +# PATCH-FIX-UPSTREAM flexmock-0.11.patch, gh#sdispater/cachy#19 +Patch1: flexmock-0.11.patch BuildRequires: %{python_module fakeredis >= 0.10.2} BuildRequires: %{python_module flexmock >= 0.10.2} BuildRequires: %{python_module msgpack-python >= 0.5} @@ -63,5 +65,6 @@ %files %{python_files} %license LICENSE %doc README.rst -%{python_sitelib}/* +%{python_sitelib}/cachy +%{python_sitelib}/cachy-%{version}*-info ++++++ flexmock-0.11.patch ++++++ From d6fd558be00e3818d01bd1f6a5290bd094a87e52 Mon Sep 17 00:00:00 2001 From: Stefano Rivera <stefano@rivera.za.net> Date: Tue, 9 Nov 2021 23:09:46 -0800 Subject: [PATCH] No need to teardown flexmock flexmock patches unittest to hook tearing down, itself. The flexmock_teardown() function is a private API that was moved in 0.11.0. --- tests/stores/test_dict_store.py | 5 +---- tests/stores/test_file_store.py | 4 +--- tests/stores/test_redis_store.py | 2 -- tests/test_cache_manager.py | 5 +---- tests/test_repository.py | 5 +---- tests/test_tagged_cache.py | 5 +---- 6 files changed, 5 insertions(+), 21 deletions(-) diff --git a/tests/stores/test_dict_store.py b/tests/stores/test_dict_store.py index b2574a3..8d4171f 100644 --- a/tests/stores/test_dict_store.py +++ b/tests/stores/test_dict_store.py @@ -1,16 +1,13 @@ # -*- coding: utf-8 -*- from unittest import TestCase -from flexmock import flexmock, flexmock_teardown +from flexmock import flexmock from cachy.stores import DictStore class DictStoreTestCase(TestCase): - def tearDown(self): - flexmock_teardown() - def test_items_can_be_set_and_retrieved(self): store = DictStore() store.put('foo', 'bar', 10) diff --git a/tests/stores/test_file_store.py b/tests/stores/test_file_store.py index 10ab336..704612d 100644 --- a/tests/stores/test_file_store.py +++ b/tests/stores/test_file_store.py @@ -7,7 +7,7 @@ import shutil from unittest import TestCase -from flexmock import flexmock, flexmock_teardown +from flexmock import flexmock from cachy.serializers import JsonSerializer from cachy.stores import FileStore @@ -29,8 +29,6 @@ def tearDown(self): if os.path.isdir(e): shutil.rmtree(e) - flexmock_teardown() - def test_none_is_returned_if_file_doesnt_exist(self): mock = flexmock(os.path) mock.should_receive('exists').once().and_return(False) diff --git a/tests/stores/test_redis_store.py b/tests/stores/test_redis_store.py index a5009f4..82e1fb4 100644 --- a/tests/stores/test_redis_store.py +++ b/tests/stores/test_redis_store.py @@ -4,7 +4,6 @@ import redis from unittest import TestCase -from flexmock import flexmock, flexmock_teardown from fakeredis import FakeServer from fakeredis import FakeStrictRedis from cachy.stores import RedisStore @@ -23,7 +22,6 @@ def setUp(self): super(RedisStoreTestCase, self).setUp() def tearDown(self): - flexmock_teardown() self.redis.flushdb() def test_get_returns_null_when_not_found(self): diff --git a/tests/test_cache_manager.py b/tests/test_cache_manager.py index ae9dda4..b5da411 100644 --- a/tests/test_cache_manager.py +++ b/tests/test_cache_manager.py @@ -3,7 +3,7 @@ import os import tempfile from unittest import TestCase -from flexmock import flexmock, flexmock_teardown +from flexmock import flexmock from cachy import CacheManager, Repository from cachy.stores import DictStore, FileStore @@ -12,9 +12,6 @@ class RepositoryTestCase(TestCase): - def tearDown(self): - flexmock_teardown() - def test_store_get_the_correct_store(self): cache = CacheManager({ 'default': 'dict', diff --git a/tests/test_repository.py b/tests/test_repository.py index aeb53b7..f7b3bf5 100644 --- a/tests/test_repository.py +++ b/tests/test_repository.py @@ -2,7 +2,7 @@ import datetime from unittest import TestCase -from flexmock import flexmock, flexmock_teardown +from flexmock import flexmock from cachy import Repository from cachy.contracts.store import Store @@ -10,9 +10,6 @@ class RepositoryTestCase(TestCase): - def tearDown(self): - flexmock_teardown() - def test_get_returns_value_from_cache(self): repo = self._get_repository() repo.get_store().should_receive('get').once().with_args('foo').and_return('bar') diff --git a/tests/test_tagged_cache.py b/tests/test_tagged_cache.py index cefdc69..79e986c 100644 --- a/tests/test_tagged_cache.py +++ b/tests/test_tagged_cache.py @@ -7,14 +7,11 @@ from cachy.tag_set import TagSet from cachy.redis_tagged_cache import RedisTaggedCache from datetime import datetime, timedelta -from flexmock import flexmock, flexmock_teardown +from flexmock import flexmock class TaggedCacheTestCase(TestCase): - def tearDown(self): - flexmock_teardown() - def test_tags_can_be_flushed(self): store = DictStore()
participants (1)
-
Source-Sync