sdispater / cachy

Cachy provides a simple yet effective caching library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

0.3.0: pyteest is failing

kloczek opened this issue · comments

I'm trying to package your module as an rpm package. So I'm using the typical build, install and test cycle used on building packages from non-root account.

  • python3 -Bm build --no-isolation -w -s
  • install .whl file in </install/prefix>
  • "pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>

May I ask for help because few units are failing:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-cachy-0.3.0-10.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-cachy-0.3.0-10.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
Using --randomly-seed=1454322742
rootdir: /home/tkloczko/rpmbuild/BUILD/cachy-0.3.0
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, aspectlib-1.5.2, toolbox-0.5, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, flaky-3.7.0, benchmark-3.4.1, xdist-2.3.0, pylama-7.7.1, datadir-1.3.1, regressions-2.2.0, cases-3.6.3, xprocess-0.18.1, black-0.3.12, anyio-3.3.0, asyncio-0.15.1, trio-0.7.0, subtests-0.5.0, isort-2.0.0, hypothesis-6.14.6, mock-3.6.1, profiling-1.7.0, randomly-3.8.0, Faker-8.12.1, nose2pytest-1.0.8, pyfakefs-4.5.1, tornado-0.8.1, twisted-1.13.3
collected 64 items

tests/stores/test_dict_store.py .......                                                                                                                              [ 10%]
tests/stores/test_null_store.py .                                                                                                                                    [ 12%]
tests/stores/test_memcached_store.py FFFFFFFFF                                                                                                                       [ 26%]
tests/stores/test_file_store.py .........                                                                                                                            [ 40%]
tests/test_repository.py ..............                                                                                                                              [ 62%]
tests/stores/test_redis_store.py .........                                                                                                                           [ 76%]
tests/test_tagged_cache.py .......                                                                                                                                   [ 87%]
tests/test_cache_manager.py ........                                                                                                                                 [100%]

================================================================================= FAILURES =================================================================================
____________________________________________________________________ RedisStoreTestCase.test_increment _____________________________________________________________________

self = <tests.stores.test_memcached_store.RedisStoreTestCase testMethod=test_increment>

    def setUp(self):
>       self.store = MemcachedStore(['127.0.0.1:11211'], 'prefix:')

tests/stores/test_memcached_store.py:11:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <cachy.stores.memcached_store.MemcachedStore object at 0x7feb0f6c2c40>, servers = ['127.0.0.1:11211'], prefix = 'prefix:', kwargs = {}

    def __init__(self, servers, prefix='', **kwargs):
        # Removing potential "driver" key
        kwargs.pop('driver', None)

        self._prefix = prefix
>       self._memcache = memcache.Client(servers, **kwargs)
E       AttributeError: 'NoneType' object has no attribute 'Client'

cachy/stores/memcached_store.py:21: AttributeError
_____________________________________________________________ RedisStoreTestCase.test_put_value_into_memcache ______________________________________________________________

self = <tests.stores.test_memcached_store.RedisStoreTestCase testMethod=test_put_value_into_memcache>

    def setUp(self):
>       self.store = MemcachedStore(['127.0.0.1:11211'], 'prefix:')

tests/stores/test_memcached_store.py:11:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <cachy.stores.memcached_store.MemcachedStore object at 0x7feb0f5f58e0>, servers = ['127.0.0.1:11211'], prefix = 'prefix:', kwargs = {}

    def __init__(self, servers, prefix='', **kwargs):
        # Removing potential "driver" key
        kwargs.pop('driver', None)

        self._prefix = prefix
>       self._memcache = memcache.Client(servers, **kwargs)
E       AttributeError: 'NoneType' object has no attribute 'Client'

cachy/stores/memcached_store.py:21: AttributeError
______________________________________________________________________ RedisStoreTestCase.test_forget ______________________________________________________________________

self = <tests.stores.test_memcached_store.RedisStoreTestCase testMethod=test_forget>

    def setUp(self):
>       self.store = MemcachedStore(['127.0.0.1:11211'], 'prefix:')

tests/stores/test_memcached_store.py:11:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <cachy.stores.memcached_store.MemcachedStore object at 0x7feb0f5fbd00>, servers = ['127.0.0.1:11211'], prefix = 'prefix:', kwargs = {}

    def __init__(self, servers, prefix='', **kwargs):
        # Removing potential "driver" key
        kwargs.pop('driver', None)

        self._prefix = prefix
>       self._memcache = memcache.Client(servers, **kwargs)
E       AttributeError: 'NoneType' object has no attribute 'Client'

cachy/stores/memcached_store.py:21: AttributeError
_________________________________________________________ RedisStoreTestCase.test_get_returns_null_when_not_found __________________________________________________________

self = <tests.stores.test_memcached_store.RedisStoreTestCase testMethod=test_get_returns_null_when_not_found>

    def setUp(self):
>       self.store = MemcachedStore(['127.0.0.1:11211'], 'prefix:')

tests/stores/test_memcached_store.py:11:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <cachy.stores.memcached_store.MemcachedStore object at 0x7feb0f46e310>, servers = ['127.0.0.1:11211'], prefix = 'prefix:', kwargs = {}

    def __init__(self, servers, prefix='', **kwargs):
        # Removing potential "driver" key
        kwargs.pop('driver', None)

        self._prefix = prefix
>       self._memcache = memcache.Client(servers, **kwargs)
E       AttributeError: 'NoneType' object has no attribute 'Client'

cachy/stores/memcached_store.py:21: AttributeError
____________________________________________________________________ RedisStoreTestCase.test_decrement _____________________________________________________________________

self = <tests.stores.test_memcached_store.RedisStoreTestCase testMethod=test_decrement>

    def setUp(self):
>       self.store = MemcachedStore(['127.0.0.1:11211'], 'prefix:')

tests/stores/test_memcached_store.py:11:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <cachy.stores.memcached_store.MemcachedStore object at 0x7feb0f607490>, servers = ['127.0.0.1:11211'], prefix = 'prefix:', kwargs = {}

    def __init__(self, servers, prefix='', **kwargs):
        # Removing potential "driver" key
        kwargs.pop('driver', None)

        self._prefix = prefix
>       self._memcache = memcache.Client(servers, **kwargs)
E       AttributeError: 'NoneType' object has no attribute 'Client'

cachy/stores/memcached_store.py:21: AttributeError
________________________________________________________________ RedisStoreTestCase.test_put_numeric_value _________________________________________________________________

self = <tests.stores.test_memcached_store.RedisStoreTestCase testMethod=test_put_numeric_value>

    def setUp(self):
>       self.store = MemcachedStore(['127.0.0.1:11211'], 'prefix:')

tests/stores/test_memcached_store.py:11:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <cachy.stores.memcached_store.MemcachedStore object at 0x7feb0f5f0af0>, servers = ['127.0.0.1:11211'], prefix = 'prefix:', kwargs = {}

    def __init__(self, servers, prefix='', **kwargs):
        # Removing potential "driver" key
        kwargs.pop('driver', None)

        self._prefix = prefix
>       self._memcache = memcache.Client(servers, **kwargs)
E       AttributeError: 'NoneType' object has no attribute 'Client'

cachy/stores/memcached_store.py:21: AttributeError
__________________________________________________________ RedisStoreTestCase.test_value_is_returned_for_numerics __________________________________________________________

self = <tests.stores.test_memcached_store.RedisStoreTestCase testMethod=test_value_is_returned_for_numerics>

    def setUp(self):
>       self.store = MemcachedStore(['127.0.0.1:11211'], 'prefix:')

tests/stores/test_memcached_store.py:11:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <cachy.stores.memcached_store.MemcachedStore object at 0x7feb0f612520>, servers = ['127.0.0.1:11211'], prefix = 'prefix:', kwargs = {}

    def __init__(self, servers, prefix='', **kwargs):
        # Removing potential "driver" key
        kwargs.pop('driver', None)

        self._prefix = prefix
>       self._memcache = memcache.Client(servers, **kwargs)
E       AttributeError: 'NoneType' object has no attribute 'Client'

cachy/stores/memcached_store.py:21: AttributeError
________________________________________________________________ RedisStoreTestCase.test_value_is_returned _________________________________________________________________

self = <tests.stores.test_memcached_store.RedisStoreTestCase testMethod=test_value_is_returned>

    def setUp(self):
>       self.store = MemcachedStore(['127.0.0.1:11211'], 'prefix:')

tests/stores/test_memcached_store.py:11:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <cachy.stores.memcached_store.MemcachedStore object at 0x7feb0f607c70>, servers = ['127.0.0.1:11211'], prefix = 'prefix:', kwargs = {}

    def __init__(self, servers, prefix='', **kwargs):
        # Removing potential "driver" key
        kwargs.pop('driver', None)

        self._prefix = prefix
>       self._memcache = memcache.Client(servers, **kwargs)
E       AttributeError: 'NoneType' object has no attribute 'Client'

cachy/stores/memcached_store.py:21: AttributeError
_____________________________________________________________________ RedisStoreTestCase.test_forever ______________________________________________________________________

self = <tests.stores.test_memcached_store.RedisStoreTestCase testMethod=test_forever>

    def setUp(self):
>       self.store = MemcachedStore(['127.0.0.1:11211'], 'prefix:')

tests/stores/test_memcached_store.py:11:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <cachy.stores.memcached_store.MemcachedStore object at 0x7feb0f5f9910>, servers = ['127.0.0.1:11211'], prefix = 'prefix:', kwargs = {}

    def __init__(self, servers, prefix='', **kwargs):
        # Removing potential "driver" key
        kwargs.pop('driver', None)

        self._prefix = prefix
>       self._memcache = memcache.Client(servers, **kwargs)
E       AttributeError: 'NoneType' object has no attribute 'Client'

cachy/stores/memcached_store.py:21: AttributeError
========================================================================= short test summary info ==========================================================================
FAILED tests/stores/test_memcached_store.py::RedisStoreTestCase::test_increment - AttributeError: 'NoneType' object has no attribute 'Client'
FAILED tests/stores/test_memcached_store.py::RedisStoreTestCase::test_put_value_into_memcache - AttributeError: 'NoneType' object has no attribute 'Client'
FAILED tests/stores/test_memcached_store.py::RedisStoreTestCase::test_forget - AttributeError: 'NoneType' object has no attribute 'Client'
FAILED tests/stores/test_memcached_store.py::RedisStoreTestCase::test_get_returns_null_when_not_found - AttributeError: 'NoneType' object has no attribute 'Client'
FAILED tests/stores/test_memcached_store.py::RedisStoreTestCase::test_decrement - AttributeError: 'NoneType' object has no attribute 'Client'
FAILED tests/stores/test_memcached_store.py::RedisStoreTestCase::test_put_numeric_value - AttributeError: 'NoneType' object has no attribute 'Client'
FAILED tests/stores/test_memcached_store.py::RedisStoreTestCase::test_value_is_returned_for_numerics - AttributeError: 'NoneType' object has no attribute 'Client'
FAILED tests/stores/test_memcached_store.py::RedisStoreTestCase::test_value_is_returned - AttributeError: 'NoneType' object has no attribute 'Client'
FAILED tests/stores/test_memcached_store.py::RedisStoreTestCase::test_forever - AttributeError: 'NoneType' object has no attribute 'Client'
======================================================================= 9 failed, 55 passed in 0.80s =======================================================================
pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo(<process_name>).terminate()'.