kombu icon indicating copy to clipboard operation
kombu copied to clipboard

5.3.x: pytest is failing (test units depend on each other)

Open kloczek opened this issue 4 years ago • 21 comments
trafficstars

+ /usr/bin/python3 -Bm pytest -ra --ignore t/unit/transport/test_pyro.py --ignore t/unit/transport/test_azureservicebus.py --ignore kombu/transport/azureservicebus.py
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.9, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
Using --randomly-seed=2939350551
rootdir: /home/tkloczko/rpmbuild/BUILD/kombu-5.1.0, configfile: setup.cfg, testpaths: t/unit/
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, pyfakefs-4.4.0, freezegun-0.4.2, cases-3.4.6, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, Faker-8.4.0, cov-2.12.1, randomly-3.8.0, hypothesis-6.13.12
collected 1050 items / 10 skipped / 1040 selected

t/unit/asynchronous/test_timer.py ................                                                                                                                   [  1%]
t/unit/utils/test_time.py ........                                                                                                                                   [  2%]
t/unit/transport/test_memory.py ........                                                                                                                             [  3%]
t/unit/utils/test_debug.py ..                                                                                                                                        [  3%]
t/unit/test_matcher.py ...                                                                                                                                           [  3%]
t/unit/utils/test_imports.py .....                                                                                                                                   [  4%]
t/unit/asynchronous/http/test_http.py .............                                                                                                                  [  5%]
t/unit/utils/test_url.py ...................                                                                                                                         [  7%]
t/unit/asynchronous/test_semaphore.py .                                                                                                                              [  7%]
t/unit/transport/test_filesystem.py ..                                                                                                                               [  7%]
t/unit/utils/test_objects.py ..                                                                                                                                      [  7%]
t/unit/test_serialization.py .....F.........................                                                                                                         [ 10%]
t/unit/asynchronous/http/test_curl.py .........                                                                                                                      [ 11%]
t/unit/transport/test_sqlalchemy.py ...                                                                                                                              [ 11%]
t/unit/test_compat.py ......................                                                                                                                         [ 13%]
t/unit/transport/test_qpid.py ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 26%]
ssssssssssssssssssssssssssssss                                                                                                                                       [ 29%]
t/unit/transport/test_base.py ..............................                                                                                                         [ 32%]
t/unit/test_log.py ....................                                                                                                                              [ 34%]
t/unit/utils/test_scheduling.py .......                                                                                                                              [ 34%]
t/unit/asynchronous/test_hub.py .............................................                                                                                        [ 39%]
t/unit/test_message.py ....                                                                                                                                          [ 39%]
t/unit/utils/test_compat.py ......                                                                                                                                   [ 40%]
t/unit/test_compression.py s.......s...                                                                                                                              [ 41%]
t/unit/utils/test_functional.py ..................................                                                                                                   [ 44%]
t/unit/test_connection.py .......................................................................................s.........s.                                        [ 53%]
t/unit/utils/test_encoding.py .........                                                                                                                              [ 54%]
t/unit/transport/virtual/test_base.py ..........................................................                                                                     [ 60%]
t/unit/transport/test_pyamqp.py ..................                                                                                                                   [ 61%]
t/unit/test_mixins.py ....................                                                                                                                           [ 63%]
t/unit/test_pools.py .F.......................                                                                                                                       [ 66%]
t/unit/utils/test_json.py ...........                                                                                                                                [ 67%]
t/unit/transport/virtual/test_exchange.py ............FFFF.........                                                                                                  [ 69%]
t/unit/utils/test_uuid.py ..                                                                                                                                         [ 69%]
t/unit/utils/test_div.py ..                                                                                                                                          [ 70%]
t/unit/test_exceptions.py .                                                                                                                                          [ 70%]
t/unit/test_common.py .............................                                                                                                                  [ 72%]
t/unit/test_clocks.py .....                                                                                                                                          [ 73%]
t/unit/test_pidbox.py F.......................                                                                                                                       [ 75%]
t/unit/utils/test_utils.py ......                                                                                                                                    [ 76%]
t/unit/transport/test_transport.py ....                                                                                                                              [ 76%]
t/unit/transport/test_redis.py ..............................................................................................                                        [ 85%]
t/unit/test_entity.py .......F..................................................                                                                                     [ 91%]
t/unit/test_messaging.py .............................................................F.                                                                             [ 97%]
t/unit/utils/test_amq_manager.py ...                                                                                                                                 [ 97%]
t/unit/test_simple.py ..................F.........                                                                                                                   [100%]

================================================================================= FAILURES =================================================================================
____________________________________________________________________ test_Serialization.test_yaml_loads ____________________________________________________________________

self = <t.unit.test_serialization.test_Serialization object at 0x7f0195258670>

    def test_yaml_loads(self):
        pytest.importorskip('yaml')
        register_yaml()
>       assert loads(
            yaml_data,
            content_type='application/x-yaml',
            content_encoding='utf-8') == py_data

t/unit/test_serialization.py:225:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <kombu.serialization.SerializerRegistry object at 0x7f019637c820>
data = 'float: 3.1415926500000002\nint: 10\nlist: [george, jerry, elaine, cosmo]\nstring: The quick brown fox jumps over the lazy dog\nunicode: "Th\\xE9 quick brown fox jumps over th\\xE9 lazy dog"\n'
content_type = 'application/x-yaml', content_encoding = 'utf-8', accept = None, force = False, _trusted_content = frozenset({'application/data', 'application/text'})

    def loads(self, data, content_type, content_encoding,
              accept=None, force=False, _trusted_content=TRUSTED_CONTENT):
        """Decode serialized data.

        Deserialize a data stream as serialized using `dumps`
        based on `content_type`.

        Arguments:
            data (bytes, buffer, str): The message data to deserialize.

            content_type (str): The content-type of the data.
                (e.g., `application/json`).

            content_encoding (str): The content-encoding of the data.
                (e.g., `utf-8`, `binary`, or `us-ascii`).

            accept (Set): List of content-types to accept.

        Raises:
            ContentDisallowed: If the content-type is not accepted.

        Returns:
            Any: The unserialized data.
        """
        content_type = (bytes_to_str(content_type) if content_type
                        else 'application/data')
        if accept is not None:
            if content_type not in _trusted_content \
                    and content_type not in accept:
                raise self._for_untrusted_content(content_type, 'untrusted')
        else:
            if content_type in self._disabled_content_types and not force:
>               raise self._for_untrusted_content(content_type, 'disabled')
E               kombu.exceptions.ContentDisallowed: Refusing to deserialize disabled content of type yaml (application/x-yaml)

kombu/serialization.py:248: ContentDisallowed
_____________________________________________________________________ test_PoolGroup.test_Connections ______________________________________________________________________

self = <t.unit.test_pools.test_PoolGroup object at 0x7f01927e4610>

    def test_Connections(self):
        conn = Connection('memory://')
        p = pools.connections[conn]
        assert p
        assert isinstance(p, ConnectionPool)
>       assert p.connection is conn
E       assert <Connection: memory://localhost// at 0x7f01927e4880> is <Connection: memory://localhost// at 0x7f01927f08b0>
E        +  where <Connection: memory://localhost// at 0x7f01927e4880> = <kombu.connection.ConnectionPool object at 0x7f01927f0280>.connection

t/unit/test_pools.py:151: AssertionError
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
WARNING  kombu.connection:connection.py:631 No hostname was supplied. Reverting to default 'localhost'
WARNING  kombu.connection:connection.py:631 No hostname was supplied. Reverting to default 'localhost'
WARNING  kombu.connection:connection.py:631 No hostname was supplied. Reverting to default 'localhost'
WARNING  kombu.connection:connection.py:631 No hostname was supplied. Reverting to default 'localhost'
___________________________________________________ test_TopicMultibind.test_lookup[eFoo-stock.us.nasdaq-None-expected0] ___________________________________________________

self = <t.unit.transport.virtual.test_exchange.test_TopicMultibind object at 0x7f019348f7f0>, exchange = 'eFoo', routing_key = 'stock.us.nasdaq', default = None
expected = {'rFoo'}

    @pytest.mark.parametrize('exchange,routing_key,default,expected', [
        ('eFoo', 'stock.us.nasdaq', None, {'rFoo'}),
        ('eFoo', 'stock.europe.OSE', None, {'rFoo'}),
        ('eFoo', 'stockxeuropexOSE', None, {'rFoo'}),
        ('eFoo', 'candy.schleckpulver.snap_crackle', None, {'rFoo'}),
    ])
    def test_lookup(self, exchange, routing_key, default, expected):
>       assert self.e._compiled
E       assert {}
E        +  where {} = <kombu.transport.virtual.exchange.TopicExchange object at 0x7f019348f940>._compiled
E        +    where <kombu.transport.virtual.exchange.TopicExchange object at 0x7f019348f940> = <t.unit.transport.virtual.test_exchange.test_TopicMultibind object at 0x7f019348f7f0>.e

t/unit/transport/virtual/test_exchange.py:129: AssertionError
__________________________________________________ test_TopicMultibind.test_lookup[eFoo-stockxeuropexOSE-None-expected2] ___________________________________________________

self = <t.unit.transport.virtual.test_exchange.test_TopicMultibind object at 0x7f019348f280>, exchange = 'eFoo', routing_key = 'stockxeuropexOSE', default = None
expected = {'rFoo'}

    @pytest.mark.parametrize('exchange,routing_key,default,expected', [
        ('eFoo', 'stock.us.nasdaq', None, {'rFoo'}),
        ('eFoo', 'stock.europe.OSE', None, {'rFoo'}),
        ('eFoo', 'stockxeuropexOSE', None, {'rFoo'}),
        ('eFoo', 'candy.schleckpulver.snap_crackle', None, {'rFoo'}),
    ])
    def test_lookup(self, exchange, routing_key, default, expected):
>       assert self.e._compiled
E       assert {}
E        +  where {} = <kombu.transport.virtual.exchange.TopicExchange object at 0x7f0193406130>._compiled
E        +    where <kombu.transport.virtual.exchange.TopicExchange object at 0x7f0193406130> = <t.unit.transport.virtual.test_exchange.test_TopicMultibind object at 0x7f019348f280>.e

t/unit/transport/virtual/test_exchange.py:129: AssertionError
__________________________________________ test_TopicMultibind.test_lookup[eFoo-candy.schleckpulver.snap_crackle-None-expected3] ___________________________________________

self = <t.unit.transport.virtual.test_exchange.test_TopicMultibind object at 0x7f0193406df0>, exchange = 'eFoo', routing_key = 'candy.schleckpulver.snap_crackle'
default = None, expected = {'rFoo'}

    @pytest.mark.parametrize('exchange,routing_key,default,expected', [
        ('eFoo', 'stock.us.nasdaq', None, {'rFoo'}),
        ('eFoo', 'stock.europe.OSE', None, {'rFoo'}),
        ('eFoo', 'stockxeuropexOSE', None, {'rFoo'}),
        ('eFoo', 'candy.schleckpulver.snap_crackle', None, {'rFoo'}),
    ])
    def test_lookup(self, exchange, routing_key, default, expected):
>       assert self.e._compiled
E       assert {}
E        +  where {} = <kombu.transport.virtual.exchange.TopicExchange object at 0x7f0193406ca0>._compiled
E        +    where <kombu.transport.virtual.exchange.TopicExchange object at 0x7f0193406ca0> = <t.unit.transport.virtual.test_exchange.test_TopicMultibind object at 0x7f0193406df0>.e

t/unit/transport/virtual/test_exchange.py:129: AssertionError
__________________________________________________ test_TopicMultibind.test_lookup[eFoo-stock.europe.OSE-None-expected1] ___________________________________________________

self = <t.unit.transport.virtual.test_exchange.test_TopicMultibind object at 0x7f0193410370>, exchange = 'eFoo', routing_key = 'stock.europe.OSE', default = None
expected = {'rFoo'}

    @pytest.mark.parametrize('exchange,routing_key,default,expected', [
        ('eFoo', 'stock.us.nasdaq', None, {'rFoo'}),
        ('eFoo', 'stock.europe.OSE', None, {'rFoo'}),
        ('eFoo', 'stockxeuropexOSE', None, {'rFoo'}),
        ('eFoo', 'candy.schleckpulver.snap_crackle', None, {'rFoo'}),
    ])
    def test_lookup(self, exchange, routing_key, default, expected):
>       assert self.e._compiled
E       assert {}
E        +  where {} = <kombu.transport.virtual.exchange.TopicExchange object at 0x7f0193410550>._compiled
E        +    where <kombu.transport.virtual.exchange.TopicExchange object at 0x7f0193410550> = <t.unit.transport.virtual.test_exchange.test_TopicMultibind object at 0x7f0193410370>.e

t/unit/transport/virtual/test_exchange.py:129: AssertionError
__________________________________________________________________________ test_Mailbox.test_call __________________________________________________________________________

self = <t.unit.test_pidbox.test_Mailbox object at 0x7f019346aca0>

    def test_call(self):
        assert self.bound.call(['some_node'], 'mymethod') == 'COLLECTED'
        consumer = self.node.Consumer()
>       assert is_call(self.get_next(consumer))

t/unit/test_pidbox.py:331:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

message = None

    def is_call(message):
>       return message['method'] and message['reply_to']
E       TypeError: 'NoneType' object is not subscriptable

t/unit/test_pidbox.py:18: TypeError
_______________________________________________________________ test_Queue.test_basic_get__accept_disallowed _______________________________________________________________

self = <t.unit.test_entity.test_Queue object at 0x7f0192a07fa0>

    def test_basic_get__accept_disallowed(self):
        conn = Connection('memory://')
        q = Queue('foo', exchange=self.exchange)
        p = Producer(conn)
        p.publish(
            {'complex': object()},
            declare=[q], exchange=self.exchange, serializer='pickle',
        )

        message = q(conn).get(no_ack=True)
        assert message is not None

        with pytest.raises(q.ContentDisallowed):
>           message.decode()
E           Failed: DID NOT RAISE <class 'kombu.exceptions.ContentDisallowed'>

t/unit/test_entity.py:259: Failed
______________________________________________________________ test_Consumer.test_accept__content_disallowed _______________________________________________________________

self = <t.unit.test_messaging.test_Consumer object at 0x7f01928cc0a0>

    def test_accept__content_disallowed(self):
        conn = Connection('memory://')
        q = Queue('foo', exchange=self.exchange)
        p = conn.Producer()
        p.publish(
            {'complex': object()},
            declare=[q], exchange=self.exchange, serializer='pickle',
        )

        callback = Mock(name='callback')
        with conn.Consumer(queues=[q], callbacks=[callback]) as consumer:
            with pytest.raises(consumer.ContentDisallowed):
>               conn.drain_events(timeout=1)
E               Failed: DID NOT RAISE <class 'kombu.exceptions.ContentDisallowed'>

t/unit/test_messaging.py:305: Failed
_______________________________________________________________________ test_SimpleQueue.test_clear ________________________________________________________________________

self = <t.unit.test_simple.test_SimpleQueue object at 0x7f01928d8d90>

    def test_clear(self):
        q = self.Queue('test_clear', no_ack=True)

        for i in range(10):
            q.put({'hello': 'SimplePurge%d' % (i,)})

>       assert q.clear() == 10
E       assert 20 == 10
E        +  where 20 = <bound method SimpleBase.clear of <kombu.simple.SimpleQueue object at 0x7f01929b4610>>()
E        +    where <bound method SimpleBase.clear of <kombu.simple.SimpleQueue object at 0x7f01929b4610>> = <kombu.simple.SimpleQueue object at 0x7f01929b4610>.clear

t/unit/test_simple.py:89: AssertionError
========================================================================= short test summary info ==========================================================================
SKIPPED [4] t/unit/asynchronous/aws/case.py:5: could not import 'boto3': No module named 'boto3'
SKIPPED [1] t/unit/transport/test_SQS.py:21: could not import 'boto3': No module named 'boto3'
SKIPPED [1] t/unit/transport/test_consul.py:9: could not import 'consul': No module named 'consul'
SKIPPED [1] t/unit/transport/test_etcd.py:9: could not import 'etcd': No module named 'etcd'
SKIPPED [1] t/unit/transport/test_librabbitmq.py:5: could not import 'librabbitmq': No module named 'librabbitmq'
SKIPPED [1] t/unit/transport/test_mongodb.py:10: could not import 'pymongo': No module named 'pymongo'
SKIPPED [1] t/unit/transport/test_zookeeper.py:5: could not import 'kazoo': No module named 'kazoo'
SKIPPED [164] t/unit/transport/test_qpid.py: Not supported in Python3
SKIPPED [1] t/unit/test_compression.py:66: could not import 'zstandard': No module named 'zstandard'
SKIPPED [1] t/unit/test_compression.py:29: could not import 'zstandard': No module named 'zstandard'
SKIPPED [1] t/unit/test_connection.py:104: TODO: urllib cannot parse ipv6 urls
SKIPPED [1] t/unit/test_connection.py:52: could not import 'pymongo': No module named 'pymongo'
FAILED t/unit/test_serialization.py::test_Serialization::test_yaml_loads - kombu.exceptions.ContentDisallowed: Refusing to deserialize disabled content of type yaml (app...
FAILED t/unit/test_pools.py::test_PoolGroup::test_Connections - assert <Connection: memory://localhost// at 0x7f01927e4880> is <Connection: memory://localhost// at 0x7f0...
FAILED t/unit/transport/virtual/test_exchange.py::test_TopicMultibind::test_lookup[eFoo-stock.us.nasdaq-None-expected0] - assert {}
FAILED t/unit/transport/virtual/test_exchange.py::test_TopicMultibind::test_lookup[eFoo-stockxeuropexOSE-None-expected2] - assert {}
FAILED t/unit/transport/virtual/test_exchange.py::test_TopicMultibind::test_lookup[eFoo-candy.schleckpulver.snap_crackle-None-expected3] - assert {}
FAILED t/unit/transport/virtual/test_exchange.py::test_TopicMultibind::test_lookup[eFoo-stock.europe.OSE-None-expected1] - assert {}
FAILED t/unit/test_pidbox.py::test_Mailbox::test_call - TypeError: 'NoneType' object is not subscriptable
FAILED t/unit/test_entity.py::test_Queue::test_basic_get__accept_disallowed - Failed: DID NOT RAISE <class 'kombu.exceptions.ContentDisallowed'>
FAILED t/unit/test_messaging.py::test_Consumer::test_accept__content_disallowed - Failed: DID NOT RAISE <class 'kombu.exceptions.ContentDisallowed'>
FAILED t/unit/test_simple.py::test_SimpleQueue::test_clear - assert 20 == 10
=============================================================== 10 failed, 872 passed, 178 skipped in 19.02s ===============================================================

kloczek avatar Jun 04 '21 12:06 kloczek

Hey @kloczek :wave:, Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our Open Collective and consider backing us - every little helps!

We also offer priority support for our sponsors. If you require immediate assistance please consider sponsoring us.

@xirdneh Can you help stabilize the build, please?

thedrow avatar Jun 06 '21 08:06 thedrow

I have checked the unittest and they are running correctly - master and 5.1.0b1 tag - see below. The only failing unittest is caused by my setting of AWS region in system.

(kombu38) matus@dev:~/dev/kombu$ pytest -ra --ignore t/unit/transport/test_pyro.py --ignore t/unit/transport/test_azureservicebus.py --ignore kombu/transport/azureservicebus.py
Test session starts (platform: linux, Python 3.8.5, pytest 5.3.5, pytest-sugar 0.9.4)
rootdir: /home/matus/dev/kombu, inifile: setup.cfg, testpaths: t/unit/
plugins: cov-2.12.1, case-1.5.3, travis-fold-1.3.0, sugar-0.9.4
collecting ...
 t/unit/test_clocks.py ✓✓✓✓✓                                                                                                                                                                                                                                   0% ▏
 t/unit/test_common.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                                           3% ▍
 t/unit/test_compat.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                                                  5% ▌
 t/unit/test_compression.py ✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                                                       6% ▋
 t/unit/test_connection.py ✓✓✓s✓✓✓✓✓✓✓✓✓✓✓✓s✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                14% █▌
 t/unit/test_entity.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                             19% █▉
 t/unit/test_exceptions.py ✓                                                                                                                                                                                                                                  19% █▉
 t/unit/test_log.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                                                      21% ██▎
 t/unit/test_matcher.py ✓✓✓                                                                                                                                                                                                                                   21% ██▎
 t/unit/test_message.py ✓✓✓✓                                                                                                                                                                                                                                  22% ██▎
 t/unit/test_messaging.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                     27% ██▊
 t/unit/test_mixins.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                                                   29% ██▉
 t/unit/test_pidbox.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                                               31% ███▏
 t/unit/test_pools.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                                               33% ███▍
 t/unit/test_serialization.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                                   36% ███▋
 t/unit/test_simple.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                                               38% ███▊
 t/unit/asynchronous/test_hub.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                41% ████▎
 t/unit/asynchronous/test_semaphore.py ✓                                                                                                                                                                                                                      42% ████▎
 t/unit/asynchronous/test_timer.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                                           43% ████▍
 t/unit/asynchronous/aws/test_aws.py ✓                                                                                                                                                                                                                        43% ████▍
 t/unit/asynchronous/aws/test_connection.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                          45% ████▌
 t/unit/asynchronous/aws/sqs/test_connection.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                        47% ████▊
 t/unit/asynchronous/aws/sqs/test_queue.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                         49% ████▉
 t/unit/asynchronous/http/test_curl.py ✓✓✓✓✓✓✓✓✓                                                                                                                                                                                                              50% █████
 t/unit/asynchronous/http/test_http.py ✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                                          51% █████▏
 t/unit/transport/test_SQS.py ✓                                                                                                                                                                                                                               51% █████▎

――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― test_Channel.test_region ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
self = <t.unit.transport.test_SQS.test_Channel object at 0x7f64993470a0>

    def test_region(self):
        _environ = dict(os.environ)

        # when the region is unspecified
        connection = Connection(transport=SQS.Transport)
        channel = connection.channel()
        assert channel.transport_options.get('region') is None
        # the default region is us-east-1
>       assert channel.region == 'us-east-1'
E       AssertionError: assert 'eu-west-1' == 'us-east-1'
E         - eu-west-1
E         + us-east-1

t/unit/transport/test_SQS.py:214: AssertionError

 t/unit/transport/test_SQS.py ⨯✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                               54% █████▌
 t/unit/transport/test_base.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                                 57% █████▋
 t/unit/transport/test_consul.py ✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                                                  57% █████▊
 t/unit/transport/test_filesystem.py ✓✓                                                                                                                                                                                                                       58% █████▊
 t/unit/transport/test_memory.py ✓✓✓✓✓✓✓✓                                                                                                                                                                                                                     58% █████▉
 t/unit/transport/test_pyamqp.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                                           60% ██████
 t/unit/transport/test_qpid.py ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss                                                           74% ███████▍
 t/unit/transport/test_redis.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                82% ████████▎
 t/unit/transport/test_sqlalchemy.py ✓✓✓                                                                                                                                                                                                                      82% ████████▎
 t/unit/transport/test_transport.py ✓✓✓✓                                                                                                                                                                                                                      83% ████████▍
 t/unit/transport/test_zookeeper.py ✓✓✓✓                                                                                                                                                                                                                      83% ████████▍
 t/unit/transport/virtual/test_base.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                             88% ████████▊
 t/unit/transport/virtual/test_exchange.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                          90% █████████
 t/unit/utils/test_amq_manager.py ✓✓✓                                                                                                                                                                                                                         90% █████████
 t/unit/utils/test_compat.py ✓✓✓✓✓✓                                                                                                                                                                                                                           91% █████████▏ t/unit/utils/test_debug.py ✓✓                                                                                                                                                                                                                                91% █████████▏ t/unit/utils/test_div.py ✓✓                                                                                                                                                                                                                                  91% █████████▎ t/unit/utils/test_encoding.py ✓✓✓✓✓✓✓✓✓                                                                                                                                                                                                                      92% █████████▎ t/unit/utils/test_functional.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                           95% █████████▌ t/unit/utils/test_imports.py ✓✓✓✓✓                                                                                                                                                                                                                           95% █████████▌ t/unit/utils/test_json.py ✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                                                        96% █████████▋ t/unit/utils/test_objects.py ✓✓                                                                                                                                                                                                                              96% █████████▋ t/unit/utils/test_scheduling.py ✓✓✓✓✓✓✓                                                                                                                                                                                                                      97% █████████▊ t/unit/utils/test_time.py ✓✓✓✓✓✓✓✓                                                                                                                                                                                                                           98% █████████▊ t/unit/utils/test_url.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                                                 99% █████████▉ t/unit/utils/test_utils.py ✓✓✓✓✓✓                                                                                                                                                                                                                            99% ██████████ t/unit/utils/test_uuid.py ✓✓                                                                                                                                                                                                                                100% ██████████========================================================================================================================= short test summary info ==========================================================================================================================SKIPPED [1] /home/matus/dev/kombu/t/unit/transport/test_etcd.py:9: could not import 'etcd': No module named 'etcd'
SKIPPED [1] /home/matus/dev/kombu/t/unit/transport/test_librabbitmq.py:5: could not import 'librabbitmq': No module named 'librabbitmq'
SKIPPED [1] /home/matus/dev/kombu/t/unit/transport/test_mongodb.py:10: could not import 'pymongo': No module named 'pymongo'
SKIPPED [1] /home/matus/dev/kombu/t/unit/test_connection.py:52: could not import 'pymongo': No module named 'pymongo'
SKIPPED [1] t/unit/test_connection.py:104: TODO: urllib cannot parse ipv6 urls
SKIPPED [164] t/unit/transport/test_qpid.py: Not supported in Python3
FAILED t/unit/transport/test_SQS.py::test_Channel::test_region - AssertionError: assert 'eu-west-1' == 'us-east-1'

Results (16.75s):
     999 passed
       1 failed
         - t/unit/transport/test_SQS.py:206 test_Channel.test_region
     166 skipped

matusvalo avatar Jun 09 '21 07:06 matusvalo

It seems that a lot of errors reported are caused by not installed libraries...

matusvalo avatar Jun 09 '21 07:06 matusvalo

OK. Which one in this case?

kloczek avatar Jun 09 '21 07:06 kloczek

OK. Which one in this case?

Oh sorry on second look they are skipped:

SKIPPED [4] t/unit/asynchronous/aws/case.py:5: could not import 'boto3': No module named 'boto3'
SKIPPED [1] t/unit/transport/test_SQS.py:21: could not import 'boto3': No module named 'boto3'
SKIPPED [1] t/unit/transport/test_consul.py:9: could not import 'consul': No module named 'consul'
SKIPPED [1] t/unit/transport/test_etcd.py:9: could not import 'etcd': No module named 'etcd'
SKIPPED [1] t/unit/transport/test_librabbitmq.py:5: could not import 'librabbitmq': No module named 'librabbitmq'
SKIPPED [1] t/unit/transport/test_mongodb.py:10: could not import 'pymongo': No module named 'pymongo'
SKIPPED [1] t/unit/transport/test_zookeeper.py:5: could not import 'kazoo': No module named 'kazoo'
SKIPPED [164] t/unit/transport/test_qpid.py: Not supported in Python3
SKIPPED [1] t/unit/test_compression.py:66: could not import 'zstandard': No module named 'zstandard'
SKIPPED [1] t/unit/test_compression.py:29: could not import 'zstandard': No module named 'zstandard'
SKIPPED [1] t/unit/test_connection.py:104: TODO: urllib cannot parse ipv6 urls
SKIPPED [1] t/unit/test_connection.py:52: could not import 'pymongo': No module named 'pymongo'

No sure why these tests are failing. Are you executing them on master branch?

matusvalo avatar Jun 09 '21 08:06 matusvalo

Those test has been skipped because missing modules :) Please have a look on ^FAILED lines.

kloczek avatar Jun 09 '21 09:06 kloczek

Just tested 5.2.1 and pytest still is failing:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-kombu-5.2.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-kombu-5.2.1-2.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
Using --randomly-seed=4003525513
rootdir: /home/tkloczko/rpmbuild/BUILD/kombu-5.2.1, configfile: setup.cfg, testpaths: t/unit/
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, flake8-1.0.7, xdist-2.3.0, cov-2.12.1, mock-3.6.1, localserver-0.5.0, timeout-2.0.1, flaky-3.7.0, hypothesis-6.14.6, rerunfailures-9.1.1, checkdocs-2.7.1, anyio-3.3.1, tornasync-0.6.0.post2, randomly-3.8.0, freezegun-0.4.2, pylama-7.7.1, black-0.3.12
collected 1102 items / 11 skipped / 1091 selected

t/unit/test_compat.py ......................                                                                                                                         [  1%]
t/unit/transport/test_qpid.py ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 14%]
ssssssssssssssssssssssssssssss                                                                                                                                       [ 16%]
t/unit/transport/test_base.py ..............................                                                                                                         [ 19%]
t/unit/transport/virtual/test_exchange.py FFFF.....................                                                                                                  [ 21%]
t/unit/utils/test_url.py ...................                                                                                                                         [ 23%]
t/unit/test_common.py .............................                                                                                                                  [ 26%]
t/unit/asynchronous/test_timer.py ................                                                                                                                   [ 27%]
t/unit/utils/test_scheduling.py .......                                                                                                                              [ 28%]
t/unit/test_message.py ....                                                                                                                                          [ 28%]
t/unit/transport/test_SQS.py ...................................                                                                                                     [ 31%]
t/unit/transport/test_transport.py ....                                                                                                                              [ 32%]
t/unit/test_messaging.py ...............................................................                                                                             [ 37%]
t/unit/utils/test_compat.py ......                                                                                                                                   [ 38%]
t/unit/test_clocks.py .....                                                                                                                                          [ 38%]
t/unit/transport/test_filesystem.py ..                                                                                                                               [ 39%]
t/unit/test_connection.py .......................................................................................s....s......                                        [ 48%]
t/unit/test_entity.py ..........................................................                                                                                     [ 53%]
t/unit/transport/test_sqlalchemy.py ...                                                                                                                              [ 53%]
t/unit/asynchronous/http/test_http.py ......s......                                                                                                                  [ 54%]
t/unit/test_exceptions.py .                                                                                                                                          [ 54%]
t/unit/asynchronous/test_semaphore.py .                                                                                                                              [ 54%]
t/unit/utils/test_imports.py .....                                                                                                                                   [ 55%]
t/unit/test_serialization.py ...F.....s....s................                                                                                                         [ 58%]
t/unit/transport/test_pyro.py F.sss                                                                                                                                  [ 58%]
t/unit/transport/test_redis.py ........................................................................................................                              [ 68%]
t/unit/test_log.py ....................                                                                                                                              [ 69%]
t/unit/test_pools.py ....F.F..................                                                                                                                       [ 72%]
t/unit/test_mixins.py ....................                                                                                                                           [ 74%]
t/unit/utils/test_debug.py ..                                                                                                                                        [ 74%]
t/unit/test_pidbox.py F..........................                                                                                                                    [ 76%]
t/unit/utils/test_functional.py ..................................                                                                                                   [ 79%]
t/unit/test_simple.py ..........F................F                                                                                                                   [ 82%]
t/unit/utils/test_encoding.py .........                                                                                                                              [ 83%]
t/unit/utils/test_uuid.py ..                                                                                                                                         [ 83%]
t/unit/test_matcher.py ...                                                                                                                                           [ 83%]
t/unit/transport/test_pyamqp.py .........................                                                                                                            [ 85%]
t/unit/test_compression.py s.sss.......                                                                                                                              [ 86%]
t/unit/utils/test_amq_manager.py ...                                                                                                                                 [ 87%]
t/unit/utils/test_div.py ..                                                                                                                                          [ 87%]
t/unit/transport/virtual/test_base.py ...........................................................                                                                    [ 92%]
t/unit/transport/test_memory.py ........                                                                                                                             [ 93%]
t/unit/utils/test_time.py ........                                                                                                                                   [ 94%]
t/unit/utils/test_objects.py ..                                                                                                                                      [ 94%]
t/unit/utils/test_utils.py ......                                                                                                                                    [ 94%]
t/unit/utils/test_json.py ...........                                                                                                                                [ 95%]
t/unit/asynchronous/test_hub.py .............................................                                                                                        [100%]

================================================================================= FAILURES =================================================================================
__________________________________________________ test_TopicMultibind.test_lookup[eFoo-stockxeuropexOSE-None-expected2] ___________________________________________________

self = <t.unit.transport.virtual.test_exchange.test_TopicMultibind object at 0x7fbc9758d400>, exchange = 'eFoo', routing_key = 'stockxeuropexOSE', default = None
expected = {'rFoo'}

    @pytest.mark.parametrize('exchange,routing_key,default,expected', [
        ('eFoo', 'stock.us.nasdaq', None, {'rFoo'}),
        ('eFoo', 'stock.europe.OSE', None, {'rFoo'}),
        ('eFoo', 'stockxeuropexOSE', None, {'rFoo'}),
        ('eFoo', 'candy.schleckpulver.snap_crackle', None, {'rFoo'}),
    ])
    def test_lookup(self, exchange, routing_key, default, expected):
>       assert self.e._compiled
E       assert {}
E        +  where {} = <kombu.transport.virtual.exchange.TopicExchange object at 0x7fbc9758d7c0>._compiled
E        +    where <kombu.transport.virtual.exchange.TopicExchange object at 0x7fbc9758d7c0> = <t.unit.transport.virtual.test_exchange.test_TopicMultibind object at 0x7fbc9758d400>.e

t/unit/transport/virtual/test_exchange.py:128: AssertionError
__________________________________________ test_TopicMultibind.test_lookup[eFoo-candy.schleckpulver.snap_crackle-None-expected3] ___________________________________________

self = <t.unit.transport.virtual.test_exchange.test_TopicMultibind object at 0x7fbc9758d6d0>, exchange = 'eFoo', routing_key = 'candy.schleckpulver.snap_crackle'
default = None, expected = {'rFoo'}

    @pytest.mark.parametrize('exchange,routing_key,default,expected', [
        ('eFoo', 'stock.us.nasdaq', None, {'rFoo'}),
        ('eFoo', 'stock.europe.OSE', None, {'rFoo'}),
        ('eFoo', 'stockxeuropexOSE', None, {'rFoo'}),
        ('eFoo', 'candy.schleckpulver.snap_crackle', None, {'rFoo'}),
    ])
    def test_lookup(self, exchange, routing_key, default, expected):
>       assert self.e._compiled
E       assert {}
E        +  where {} = <kombu.transport.virtual.exchange.TopicExchange object at 0x7fbc97566430>._compiled
E        +    where <kombu.transport.virtual.exchange.TopicExchange object at 0x7fbc97566430> = <t.unit.transport.virtual.test_exchange.test_TopicMultibind object at 0x7fbc9758d6d0>.e

t/unit/transport/virtual/test_exchange.py:128: AssertionError
___________________________________________________ test_TopicMultibind.test_lookup[eFoo-stock.us.nasdaq-None-expected0] ___________________________________________________

self = <t.unit.transport.virtual.test_exchange.test_TopicMultibind object at 0x7fbc975669a0>, exchange = 'eFoo', routing_key = 'stock.us.nasdaq', default = None
expected = {'rFoo'}

    @pytest.mark.parametrize('exchange,routing_key,default,expected', [
        ('eFoo', 'stock.us.nasdaq', None, {'rFoo'}),
        ('eFoo', 'stock.europe.OSE', None, {'rFoo'}),
        ('eFoo', 'stockxeuropexOSE', None, {'rFoo'}),
        ('eFoo', 'candy.schleckpulver.snap_crackle', None, {'rFoo'}),
    ])
    def test_lookup(self, exchange, routing_key, default, expected):
>       assert self.e._compiled
E       assert {}
E        +  where {} = <kombu.transport.virtual.exchange.TopicExchange object at 0x7fbc97566df0>._compiled
E        +    where <kombu.transport.virtual.exchange.TopicExchange object at 0x7fbc97566df0> = <t.unit.transport.virtual.test_exchange.test_TopicMultibind object at 0x7fbc975669a0>.e

t/unit/transport/virtual/test_exchange.py:128: AssertionError
__________________________________________________ test_TopicMultibind.test_lookup[eFoo-stock.europe.OSE-None-expected1] ___________________________________________________

self = <t.unit.transport.virtual.test_exchange.test_TopicMultibind object at 0x7fbc974f66a0>, exchange = 'eFoo', routing_key = 'stock.europe.OSE', default = None
expected = {'rFoo'}

    @pytest.mark.parametrize('exchange,routing_key,default,expected', [
        ('eFoo', 'stock.us.nasdaq', None, {'rFoo'}),
        ('eFoo', 'stock.europe.OSE', None, {'rFoo'}),
        ('eFoo', 'stockxeuropexOSE', None, {'rFoo'}),
        ('eFoo', 'candy.schleckpulver.snap_crackle', None, {'rFoo'}),
    ])
    def test_lookup(self, exchange, routing_key, default, expected):
>       assert self.e._compiled
E       assert {}
E        +  where {} = <kombu.transport.virtual.exchange.TopicExchange object at 0x7fbc974f6af0>._compiled
E        +    where <kombu.transport.virtual.exchange.TopicExchange object at 0x7fbc974f6af0> = <t.unit.transport.virtual.test_exchange.test_TopicMultibind object at 0x7fbc974f66a0>.e

t/unit/transport/virtual/test_exchange.py:128: AssertionError
____________________________________________________________________ test_Serialization.test_yaml_loads ____________________________________________________________________

self = <t.unit.test_serialization.test_Serialization object at 0x7fbc955a5700>

    def test_yaml_loads(self):
        pytest.importorskip('yaml')
        register_yaml()
>       assert loads(
            yaml_data,
            content_type='application/x-yaml',
            content_encoding='utf-8') == py_data

t/unit/test_serialization.py:222:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <kombu.serialization.SerializerRegistry object at 0x7fbc992fda00>
data = 'float: 3.1415926500000002\nint: 10\nlist: [george, jerry, elaine, cosmo]\nstring: The quick brown fox jumps over the lazy dog\nunicode: "Th\\xE9 quick brown fox jumps over th\\xE9 lazy dog"\n'
content_type = 'application/x-yaml', content_encoding = 'utf-8', accept = None, force = False, _trusted_content = frozenset({'application/data', 'application/text'})

    def loads(self, data, content_type, content_encoding,
              accept=None, force=False, _trusted_content=TRUSTED_CONTENT):
        """Decode serialized data.

        Deserialize a data stream as serialized using `dumps`
        based on `content_type`.

        Arguments:
            data (bytes, buffer, str): The message data to deserialize.

            content_type (str): The content-type of the data.
                (e.g., `application/json`).

            content_encoding (str): The content-encoding of the data.
                (e.g., `utf-8`, `binary`, or `us-ascii`).

            accept (Set): List of content-types to accept.

        Raises:
            ContentDisallowed: If the content-type is not accepted.

        Returns:
            Any: The unserialized data.
        """
        content_type = (bytes_to_str(content_type) if content_type
                        else 'application/data')
        if accept is not None:
            if content_type not in _trusted_content \
                    and content_type not in accept:
                raise self._for_untrusted_content(content_type, 'untrusted')
        else:
            if content_type in self._disabled_content_types and not force:
>               raise self._for_untrusted_content(content_type, 'disabled')
E               kombu.exceptions.ContentDisallowed: Refusing to deserialize disabled content of type yaml (application/x-yaml)

kombu/serialization.py:245: ContentDisallowed
__________________________________________________________________ test_PyroTransport.test_driver_version __________________________________________________________________

self = <t.unit.transport.test_pyro.test_PyroTransport object at 0x7fbc95512280>

    def test_driver_version(self):
>       assert self.c.transport.driver_version()

t/unit/transport/test_pyro.py:26:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <kombu.transport.pyro.Transport object at 0x7fbc95512760>

    def driver_version(self):
>       return pyro.__version__
E       AttributeError: 'NoneType' object has no attribute '__version__'

kombu/transport/pyro.py:145: AttributeError
_____________________________________________________________________ test_PoolGroup.test_Connections ______________________________________________________________________

self = <t.unit.test_pools.test_PoolGroup object at 0x7fbc95367cd0>

    def test_Connections(self):
        conn = Connection('memory://')
        p = pools.connections[conn]
        assert p
        assert isinstance(p, ConnectionPool)
>       assert p.connection is conn
E       assert <Connection: memory://localhost// at 0x7fbc95367250> is <Connection: memory://localhost// at 0x7fbc95365f70>
E        +  where <Connection: memory://localhost// at 0x7fbc95367250> = <kombu.connection.ConnectionPool object at 0x7fbc95367280>.connection

t/unit/test_pools.py:150: AssertionError
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
WARNING  kombu.connection:connection.py:630 No hostname was supplied. Reverting to default 'localhost'
WARNING  kombu.connection:connection.py:630 No hostname was supplied. Reverting to default 'localhost'
WARNING  kombu.connection:connection.py:630 No hostname was supplied. Reverting to default 'localhost'
WARNING  kombu.connection:connection.py:630 No hostname was supplied. Reverting to default 'localhost'
______________________________________________________________________ test_PoolGroup.test_Producers _______________________________________________________________________

self = <t.unit.test_pools.test_PoolGroup object at 0x7fbc95360be0>

    def test_Producers(self):
        conn = Connection('memory://')
        p = pools.producers[conn]
        assert p
        assert isinstance(p, pools.ProducerPool)
        assert p.connections is pools.connections[conn]
>       assert p.limit == p.connections.limit
E       assert 34576 == 34577
E        +  where 34576 = <kombu.pools.ProducerPool object at 0x7fbc94a011f0>.limit
E        +  and   34577 = <kombu.connection.ConnectionPool object at 0x7fbc95360400>.limit
E        +    where <kombu.connection.ConnectionPool object at 0x7fbc95360400> = <kombu.pools.ProducerPool object at 0x7fbc94a011f0>.connections

t/unit/test_pools.py:159: AssertionError
_________________________________________________________________________ test_Mailbox.test_abcast _________________________________________________________________________

self = <t.unit.test_pidbox.test_Mailbox object at 0x7fbc8cc7eca0>

    def test_abcast(self):
        self.bound.abcast('mymethod')
        consumer = self.node.Consumer()
>       assert is_cast(self.get_next(consumer))

t/unit/test_pidbox.py:322:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

message = None

    def is_cast(message):
>       return message['method']
E       TypeError: 'NoneType' object is not subscriptable

t/unit/test_pidbox.py:14: TypeError
_______________________________________________________________________ test_SimpleBuffer.test_clear _______________________________________________________________________

self = <t.unit.test_simple.test_SimpleBuffer object at 0x7fbc8cbfc850>

    def test_clear(self):
        q = self.Queue('test_clear', no_ack=True)

        for i in range(10):
            q.put({'hello': 'SimplePurge%d' % (i,)})

>       assert q.clear() == 10
E       assert 20 == 10
E        +  where 20 = <bound method SimpleBase.clear of <kombu.simple.SimpleBuffer object at 0x7fbc8cbf2880>>()
E        +    where <bound method SimpleBase.clear of <kombu.simple.SimpleBuffer object at 0x7fbc8cbf2880>> = <kombu.simple.SimpleBuffer object at 0x7fbc8cbf2880>.clear

t/unit/test_simple.py:89: AssertionError
_______________________________________________________________________ test_SimpleQueue.test_clear ________________________________________________________________________

self = <t.unit.test_simple.test_SimpleQueue object at 0x7fbc8cb9b160>

    def test_clear(self):
        q = self.Queue('test_clear', no_ack=True)

        for i in range(10):
            q.put({'hello': 'SimplePurge%d' % (i,)})

>       assert q.clear() == 10
E       assert 20 == 10
E        +  where 20 = <bound method SimpleBase.clear of <kombu.simple.SimpleQueue object at 0x7fbc8cba5580>>()
E        +    where <bound method SimpleBase.clear of <kombu.simple.SimpleQueue object at 0x7fbc8cba5580>> = <kombu.simple.SimpleQueue object at 0x7fbc8cba5580>.clear

t/unit/test_simple.py:89: AssertionError
========================================================================= short test summary info ==========================================================================
SKIPPED [4] t/unit/asynchronous/aws/case.py:6: could not import 'pycurl': No module named 'pycurl'
SKIPPED [1] t/unit/asynchronous/http/test_curl.py:8: could not import 'pycurl': No module named 'pycurl'
SKIPPED [1] t/unit/transport/test_azureservicebus.py:12: could not import 'azure.servicebus': No module named 'azure'
SKIPPED [1] t/unit/transport/test_consul.py:8: could not import 'consul': No module named 'consul'
SKIPPED [1] t/unit/transport/test_etcd.py:8: could not import 'etcd': No module named 'etcd'
SKIPPED [1] t/unit/transport/test_librabbitmq.py:5: could not import 'librabbitmq': No module named 'librabbitmq'
SKIPPED [1] t/unit/transport/test_mongodb.py:9: could not import 'pymongo': No module named 'pymongo'
SKIPPED [1] t/unit/transport/test_zookeeper.py:6: could not import 'kazoo': No module named 'kazoo'
SKIPPED [164] t/unit/transport/test_qpid.py: Not supported in Python3
SKIPPED [1] t/unit/test_connection.py:50: could not import 'pymongo': No module named 'pymongo'
SKIPPED [1] t/unit/test_connection.py:102: TODO: urllib cannot parse ipv6 urls
SKIPPED [1] t/unit/asynchronous/http/test_http.py:148: could not import 'pycurl': No module named 'pycurl'
SKIPPED [1] t/unit/test_serialization.py:197: could not import 'msgpack': No module named 'msgpack'
SKIPPED [1] t/unit/test_serialization.py:205: could not import 'msgpack': No module named 'msgpack'
SKIPPED [1] t/unit/transport/test_pyro.py:28: requires running Pyro nameserver and Kombu Broker
SKIPPED [1] t/unit/transport/test_pyro.py:65: requires running Pyro nameserver and Kombu Broker
SKIPPED [1] t/unit/transport/test_pyro.py:87: requires running Pyro nameserver and Kombu Broker
SKIPPED [1] t/unit/test_compression.py:47: could not import 'brotli': No module named 'brotli'
SKIPPED [1] t/unit/test_compression.py:28: could not import 'zstandard': No module named 'zstandard'
SKIPPED [1] t/unit/test_compression.py:18: could not import 'brotli': No module named 'brotli'
SKIPPED [1] t/unit/test_compression.py:65: could not import 'zstandard': No module named 'zstandard'
FAILED t/unit/transport/virtual/test_exchange.py::test_TopicMultibind::test_lookup[eFoo-stockxeuropexOSE-None-expected2] - assert {}
FAILED t/unit/transport/virtual/test_exchange.py::test_TopicMultibind::test_lookup[eFoo-candy.schleckpulver.snap_crackle-None-expected3] - assert {}
FAILED t/unit/transport/virtual/test_exchange.py::test_TopicMultibind::test_lookup[eFoo-stock.us.nasdaq-None-expected0] - assert {}
FAILED t/unit/transport/virtual/test_exchange.py::test_TopicMultibind::test_lookup[eFoo-stock.europe.OSE-None-expected1] - assert {}
FAILED t/unit/test_serialization.py::test_Serialization::test_yaml_loads - kombu.exceptions.ContentDisallowed: Refusing to deserialize disabled content of type yaml (app...
FAILED t/unit/transport/test_pyro.py::test_PyroTransport::test_driver_version - AttributeError: 'NoneType' object has no attribute '__version__'
FAILED t/unit/test_pools.py::test_PoolGroup::test_Connections - assert <Connection: memory://localhost// at 0x7fbc95367250> is <Connection: memory://localhost// at 0x7fb...
FAILED t/unit/test_pools.py::test_PoolGroup::test_Producers - assert 34576 == 34577
FAILED t/unit/test_pidbox.py::test_Mailbox::test_abcast - TypeError: 'NoneType' object is not subscriptable
FAILED t/unit/test_simple.py::test_SimpleBuffer::test_clear - assert 20 == 10
FAILED t/unit/test_simple.py::test_SimpleQueue::test_clear - assert 20 == 10
=============================================================== 11 failed, 915 passed, 187 skipped in 24.90s ===============================================================

kloczek avatar Nov 09 '21 10:11 kloczek

Just found that on running multiple times pytest set of failing units is different. All that happens because I'm using pytest-randomly. After disable that pytest plugin only one unit is failing:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-kombu-5.2.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-kombu-5.2.1-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -p no:randomly
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.10.0, pluggy-0.13.1
rootdir: /home/tkloczko/rpmbuild/BUILD/kombu-5.2.1, configfile: setup.cfg, testpaths: t/unit/
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, flake8-1.0.7, xdist-2.3.0, cov-2.12.1, mock-3.6.1, localserver-0.5.0, timeout-2.0.1, flaky-3.7.0, hypothesis-6.14.6, rerunfailures-9.1.1, checkdocs-2.7.1, anyio-3.3.1, tornasync-0.6.0.post2, freezegun-0.4.2, pylama-7.7.1, black-0.3.12
collected 1102 items / 11 skipped / 1091 selected

t/unit/test_clocks.py .....                                                                                                                                          [  0%]
t/unit/test_common.py .............................                                                                                                                  [  3%]
t/unit/test_compat.py ......................                                                                                                                         [  5%]
t/unit/test_compression.py ..s.s..s.s..                                                                                                                              [  6%]
t/unit/test_connection.py ...s............s..................................................................................                                        [ 15%]
t/unit/test_entity.py ..........................................................                                                                                     [ 20%]
t/unit/test_exceptions.py .                                                                                                                                          [ 20%]
t/unit/test_log.py ....................                                                                                                                              [ 22%]
t/unit/test_matcher.py ...                                                                                                                                           [ 22%]
t/unit/test_message.py ....                                                                                                                                          [ 22%]
t/unit/test_messaging.py ...............................................................                                                                             [ 28%]
t/unit/test_mixins.py ....................                                                                                                                           [ 30%]
t/unit/test_pidbox.py ...........................                                                                                                                    [ 32%]
t/unit/test_pools.py .........................                                                                                                                       [ 35%]
t/unit/test_serialization.py .............ss................                                                                                                         [ 38%]
t/unit/test_simple.py ............................                                                                                                                   [ 40%]
t/unit/asynchronous/test_hub.py .............................................                                                                                        [ 44%]
t/unit/asynchronous/test_semaphore.py .                                                                                                                              [ 44%]
t/unit/asynchronous/test_timer.py ................                                                                                                                   [ 46%]
t/unit/asynchronous/http/test_http.py ............s                                                                                                                  [ 47%]
t/unit/transport/test_SQS.py ...................................                                                                                                     [ 50%]
t/unit/transport/test_base.py ..............................                                                                                                         [ 53%]
t/unit/transport/test_filesystem.py ..                                                                                                                               [ 53%]
t/unit/transport/test_memory.py ........                                                                                                                             [ 54%]
t/unit/transport/test_pyamqp.py .........................                                                                                                            [ 56%]
t/unit/transport/test_pyro.py Fs.ss                                                                                                                                  [ 56%]
t/unit/transport/test_qpid.py ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 69%]
ssssssssssssssssssssssssssssss                                                                                                                                       [ 71%]
t/unit/transport/test_redis.py ........................................................................................................                              [ 81%]
t/unit/transport/test_sqlalchemy.py ...                                                                                                                              [ 81%]
t/unit/transport/test_transport.py ....                                                                                                                              [ 81%]
t/unit/transport/virtual/test_base.py ...........................................................                                                                    [ 87%]
t/unit/transport/virtual/test_exchange.py .........................                                                                                                  [ 89%]
t/unit/utils/test_amq_manager.py ...                                                                                                                                 [ 89%]
t/unit/utils/test_compat.py ......                                                                                                                                   [ 90%]
t/unit/utils/test_debug.py ..                                                                                                                                        [ 90%]
t/unit/utils/test_div.py ..                                                                                                                                          [ 90%]
t/unit/utils/test_encoding.py .........                                                                                                                              [ 91%]
t/unit/utils/test_functional.py ..................................                                                                                                   [ 94%]
t/unit/utils/test_imports.py .....                                                                                                                                   [ 95%]
t/unit/utils/test_json.py ...........                                                                                                                                [ 96%]
t/unit/utils/test_objects.py ..                                                                                                                                      [ 96%]
t/unit/utils/test_scheduling.py .......                                                                                                                              [ 96%]
t/unit/utils/test_time.py ........                                                                                                                                   [ 97%]
t/unit/utils/test_url.py ...................                                                                                                                         [ 99%]
t/unit/utils/test_utils.py ......                                                                                                                                    [ 99%]
t/unit/utils/test_uuid.py ..                                                                                                                                         [100%]

================================================================================= FAILURES =================================================================================
__________________________________________________________________ test_PyroTransport.test_driver_version __________________________________________________________________

self = <t.unit.transport.test_pyro.test_PyroTransport object at 0x7fa4d1406c40>

    def test_driver_version(self):
>       assert self.c.transport.driver_version()

t/unit/transport/test_pyro.py:26:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <kombu.transport.pyro.Transport object at 0x7fa4d13b5640>

    def driver_version(self):
>       return pyro.__version__
E       AttributeError: 'NoneType' object has no attribute '__version__'

kombu/transport/pyro.py:145: AttributeError
========================================================================= short test summary info ==========================================================================
SKIPPED [4] t/unit/asynchronous/aws/case.py:6: could not import 'pycurl': No module named 'pycurl'
SKIPPED [1] t/unit/asynchronous/http/test_curl.py:8: could not import 'pycurl': No module named 'pycurl'
SKIPPED [1] t/unit/transport/test_azureservicebus.py:12: could not import 'azure.servicebus': No module named 'azure'
SKIPPED [1] t/unit/transport/test_consul.py:8: could not import 'consul': No module named 'consul'
SKIPPED [1] t/unit/transport/test_etcd.py:8: could not import 'etcd': No module named 'etcd'
SKIPPED [1] t/unit/transport/test_librabbitmq.py:5: could not import 'librabbitmq': No module named 'librabbitmq'
SKIPPED [1] t/unit/transport/test_mongodb.py:9: could not import 'pymongo': No module named 'pymongo'
SKIPPED [1] t/unit/transport/test_zookeeper.py:6: could not import 'kazoo': No module named 'kazoo'
SKIPPED [1] t/unit/test_compression.py:18: could not import 'brotli': No module named 'brotli'
SKIPPED [1] t/unit/test_compression.py:28: could not import 'zstandard': No module named 'zstandard'
SKIPPED [1] t/unit/test_compression.py:47: could not import 'brotli': No module named 'brotli'
SKIPPED [1] t/unit/test_compression.py:65: could not import 'zstandard': No module named 'zstandard'
SKIPPED [1] t/unit/test_connection.py:50: could not import 'pymongo': No module named 'pymongo'
SKIPPED [1] t/unit/test_connection.py:102: TODO: urllib cannot parse ipv6 urls
SKIPPED [1] t/unit/test_serialization.py:197: could not import 'msgpack': No module named 'msgpack'
SKIPPED [1] t/unit/test_serialization.py:205: could not import 'msgpack': No module named 'msgpack'
SKIPPED [1] t/unit/asynchronous/http/test_http.py:148: could not import 'pycurl': No module named 'pycurl'
SKIPPED [1] t/unit/transport/test_pyro.py:28: requires running Pyro nameserver and Kombu Broker
SKIPPED [1] t/unit/transport/test_pyro.py:65: requires running Pyro nameserver and Kombu Broker
SKIPPED [1] t/unit/transport/test_pyro.py:87: requires running Pyro nameserver and Kombu Broker
SKIPPED [164] t/unit/transport/test_qpid.py: Not supported in Python3
FAILED t/unit/transport/test_pyro.py::test_PyroTransport::test_driver_version - AttributeError: 'NoneType' object has no attribute '__version__'
=============================================================== 1 failed, 925 passed, 187 skipped in 23.93s ================================================================

To diagnose what needs to be fixed for randomple plugin https://github.com/mrbean-bremen/pytest-find-dependencies/ needs to be used.

kloczek avatar Nov 09 '21 10:11 kloczek

you are welcome to contribute to CI and test

auvipy avatar Nov 09 '21 12:11 auvipy

So can you confirm that you can reporoduce that effecrt? :)

kloczek avatar Dec 22 '21 14:12 kloczek

Yes. This is a long standing bug of the test suite. Some tests just depend on each other. Could you edit this issue to reflect that?

thedrow avatar Jan 13 '22 15:01 thedrow

Yes. This is a long standing bug of the test suite. Some tests just depend on each other. Could you edit this issue to reflect that?

If that is true use pytest-randomly + https://github.com/mrbean-bremen/pytest-find-dependencies/ shoud help expose all those points where one unit depends on what does other one.

kloczek avatar Jan 13 '22 19:01 kloczek

Looks like now test suite is les and less useable and more units are now failing. Looks like test suite needs to be updated for latest sqlalchemy

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-kombu-5.2.4-3.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-kombu-5.2.4-3.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network' -p no:randomly --deselect t/unit/transport/test_pyro.py::test_PyroTransport::test_driver_version
============================= test session starts ==============================
platform linux -- Python 3.8.16, pytest-7.2.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/kombu-5.2.4, configfile: setup.cfg, testpaths: t/unit/
collected 1015 items / 1 deselected / 12 skipped / 1014 selected

t/unit/test_clocks.py .....                                              [  0%]
t/unit/test_common.py .............................                      [  3%]
t/unit/test_compat.py ......................                             [  5%]
t/unit/test_compression.py ..s.s..s.s..                                  [  6%]
t/unit/test_connection.py ..ss..............s.F......................... [ 11%]
................................................................         [ 17%]
t/unit/test_entity.py .................................................. [ 22%]
........                                                                 [ 23%]
t/unit/test_exceptions.py .                                              [ 23%]
t/unit/test_log.py ....................                                  [ 25%]
t/unit/test_matcher.py ...                                               [ 25%]
t/unit/test_message.py ....                                              [ 26%]
t/unit/test_messaging.py ............................................... [ 30%]
................                                                         [ 32%]
t/unit/test_mixins.py ....................                               [ 34%]
t/unit/test_pidbox.py ...........................                        [ 36%]
t/unit/test_pools.py .........................                           [ 39%]
t/unit/test_serialization.py .............ssss..............             [ 42%]
t/unit/test_simple.py ............................                       [ 45%]
t/unit/asynchronous/test_hub.py ........................................ [ 49%]
.....                                                                    [ 49%]
t/unit/asynchronous/test_semaphore.py .                                  [ 49%]
t/unit/asynchronous/test_timer.py ................                       [ 51%]
t/unit/asynchronous/http/test_http.py ............s                      [ 52%]
t/unit/transport/test_SQS.py ......................................      [ 56%]
t/unit/transport/test_base.py ..............................             [ 59%]
t/unit/transport/test_filesystem.py ..                                   [ 59%]
t/unit/transport/test_memory.py ........                                 [ 60%]
t/unit/transport/test_pyamqp.py .........................                [ 62%]
t/unit/transport/test_pyro.py s.ss                                       [ 63%]
t/unit/transport/test_qpid.py ssssssssssssssssssssssssssssssssssssssssss [ 67%]
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 74%]
ssssssssssssssssssssssssssssssssssssssssssssssssss                       [ 79%]
t/unit/transport/test_sqlalchemy.py FFF                                  [ 79%]
t/unit/transport/test_transport.py ....                                  [ 79%]
t/unit/transport/virtual/test_base.py .................................. [ 83%]
............................                                             [ 86%]
t/unit/transport/virtual/test_exchange.py .........................      [ 88%]
t/unit/utils/test_amq_manager.py ...                                     [ 88%]
t/unit/utils/test_compat.py ......                                       [ 89%]
t/unit/utils/test_debug.py ..                                            [ 89%]
t/unit/utils/test_div.py ..                                              [ 89%]
t/unit/utils/test_encoding.py .........                                  [ 90%]
t/unit/utils/test_functional.py ..................................       [ 94%]
t/unit/utils/test_imports.py .....                                       [ 94%]
t/unit/utils/test_json.py ...........                                    [ 95%]
t/unit/utils/test_objects.py ..                                          [ 95%]
t/unit/utils/test_scheduling.py .......                                  [ 96%]
t/unit/utils/test_time.py ........                                       [ 97%]
t/unit/utils/test_url.py ...................                             [ 99%]
t/unit/utils/test_utils.py ......                                        [ 99%]
t/unit/utils/test_uuid.py ..                                             [100%]

=================================== FAILURES ===================================
_____________ test_connection_utils.test_parse_generated_as_uri_pg _____________

self = <t.unit.test_connection.test_connection_utils object at 0x7fc3fdd7b820>

    def test_parse_generated_as_uri_pg(self):
        pytest.importorskip('sqlalchemy')
        conn = Connection(self.pg_url)
>       assert conn.as_uri() == self.pg_nopass

t/unit/test_connection.py:131:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
kombu/connection.py:672: in as_uri
    if self.transport.can_parse_url:
kombu/connection.py:909: in transport
    self._transport = self.create_transport()
kombu/connection.py:605: in create_transport
    return self.get_transport_cls()(client=self)
kombu/connection.py:611: in get_transport_cls
    transport_cls = get_transport_cls(transport_cls)
kombu/transport/__init__.py:85: in get_transport_cls
    _transport_cache[transport] = resolve_transport(transport)
kombu/transport/__init__.py:70: in resolve_transport
    return symbol_by_name(transport)
kombu/utils/imports.py:56: in symbol_by_name
    module = imp(module_name, package=package, **kwargs)
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:843: in exec_module
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
kombu/transport/sqlalchemy/__init__.py:69: in <module>
    from .models import Message as MessageBase
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    """Kombu transport using SQLAlchemy as the message store."""

    import datetime

    from sqlalchemy import (Boolean, Column, DateTime, ForeignKey, Index, Integer,
                            Sequence, SmallInteger, String, Text)
>   from sqlalchemy.orm import relation
E   ImportError: cannot import name 'relation' from 'sqlalchemy.orm' (/usr/lib64/python3.8/site-packages/sqlalchemy/orm/__init__.py)

kombu/transport/sqlalchemy/models.py:7: ImportError
_______________________ test_SqlAlchemy.test_url_parser ________________________

thing = <module 'kombu.transport' from '/home/tkloczko/rpmbuild/BUILD/kombu-5.2.4/kombu/transport/__init__.py'>
comp = 'sqlalchemy', import_path = 'kombu.transport.sqlalchemy'

    def _dot_lookup(thing, comp, import_path):
        try:
>           return getattr(thing, comp)
E           AttributeError: module 'kombu.transport' has no attribute 'sqlalchemy'

/usr/lib64/python3.8/unittest/mock.py:1215: AttributeError

During handling of the above exception, another exception occurred:

self = <t.unit.transport.test_sqlalchemy.test_SqlAlchemy object at 0x7fc3fd49a220>

    def test_url_parser(self):
>       with patch('kombu.transport.sqlalchemy.Channel._open'):

t/unit/transport/test_sqlalchemy.py:13:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/unittest/mock.py:1377: in __enter__
    self.target = self.getter()
/usr/lib64/python3.8/unittest/mock.py:1552: in <lambda>
    getter = lambda: _importer(target)
/usr/lib64/python3.8/unittest/mock.py:1228: in _importer
    thing = _dot_lookup(thing, comp, import_path)
/usr/lib64/python3.8/unittest/mock.py:1217: in _dot_lookup
    __import__(import_path)
kombu/transport/sqlalchemy/__init__.py:69: in <module>
    from .models import Message as MessageBase
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    """Kombu transport using SQLAlchemy as the message store."""

    import datetime

    from sqlalchemy import (Boolean, Column, DateTime, ForeignKey, Index, Integer,
                            Sequence, SmallInteger, String, Text)
>   from sqlalchemy.orm import relation
E   ImportError: cannot import name 'relation' from 'sqlalchemy.orm' (/usr/lib64/python3.8/site-packages/sqlalchemy/orm/__init__.py)

kombu/transport/sqlalchemy/models.py:7: ImportError
_____________________ test_SqlAlchemy.test_simple_queueing _____________________

self = <t.unit.transport.test_sqlalchemy.test_SqlAlchemy object at 0x7fc3fcd4cd00>

    def test_simple_queueing(self):
        conn = Connection('sqlalchemy+sqlite:///:memory:')
>       conn.connect()

t/unit/transport/test_sqlalchemy.py:26:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
kombu/connection.py:274: in connect
    return self._ensure_connection(
kombu/connection.py:434: in _ensure_connection
    self._connection_factory, self.recoverable_connection_errors,
kombu/utils/objects.py:30: in __get__
    return super().__get__(instance, owner)
/usr/lib64/python3.8/functools.py:967: in __get__
    val = self.func(instance)
kombu/connection.py:934: in recoverable_connection_errors
    return self.get_transport_cls().recoverable_connection_errors
kombu/connection.py:611: in get_transport_cls
    transport_cls = get_transport_cls(transport_cls)
kombu/transport/__init__.py:85: in get_transport_cls
    _transport_cache[transport] = resolve_transport(transport)
kombu/transport/__init__.py:70: in resolve_transport
    return symbol_by_name(transport)
kombu/utils/imports.py:56: in symbol_by_name
    module = imp(module_name, package=package, **kwargs)
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:843: in exec_module
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
kombu/transport/sqlalchemy/__init__.py:69: in <module>
    from .models import Message as MessageBase
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    """Kombu transport using SQLAlchemy as the message store."""

    import datetime

    from sqlalchemy import (Boolean, Column, DateTime, ForeignKey, Index, Integer,
                            Sequence, SmallInteger, String, Text)
>   from sqlalchemy.orm import relation
E   ImportError: cannot import name 'relation' from 'sqlalchemy.orm' (/usr/lib64/python3.8/site-packages/sqlalchemy/orm/__init__.py)

kombu/transport/sqlalchemy/models.py:7: ImportError
__________________________ test_SqlAlchemy.test_clone __________________________

self = <t.unit.transport.test_sqlalchemy.test_SqlAlchemy object at 0x7fc3fcd4ce80>

    def test_clone(self):
        hostname = 'sqlite:///celerydb.sqlite'
        x = Connection('+'.join(['sqla', hostname]))
        try:
            assert x.uri_prefix == 'sqla'
            assert x.hostname == hostname
>           clone = x.clone()

t/unit/transport/test_sqlalchemy.py:43:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
kombu/connection.py:616: in clone
    return self.__class__(**dict(self._info(resolve=False), **kwargs))
kombu/connection.py:626: in _info
    D = self.transport.default_connection_params
kombu/connection.py:909: in transport
    self._transport = self.create_transport()
kombu/connection.py:605: in create_transport
    return self.get_transport_cls()(client=self)
kombu/connection.py:611: in get_transport_cls
    transport_cls = get_transport_cls(transport_cls)
kombu/transport/__init__.py:85: in get_transport_cls
    _transport_cache[transport] = resolve_transport(transport)
kombu/transport/__init__.py:70: in resolve_transport
    return symbol_by_name(transport)
kombu/utils/imports.py:56: in symbol_by_name
    module = imp(module_name, package=package, **kwargs)
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:843: in exec_module
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
kombu/transport/sqlalchemy/__init__.py:69: in <module>
    from .models import Message as MessageBase
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    """Kombu transport using SQLAlchemy as the message store."""

    import datetime

    from sqlalchemy import (Boolean, Column, DateTime, ForeignKey, Index, Integer,
                            Sequence, SmallInteger, String, Text)
>   from sqlalchemy.orm import relation
E   ImportError: cannot import name 'relation' from 'sqlalchemy.orm' (/usr/lib64/python3.8/site-packages/sqlalchemy/orm/__init__.py)

kombu/transport/sqlalchemy/models.py:7: ImportError
=============================== warnings summary ===============================
t/unit/test_compat.py::test_Publisher::test_constructor
  /usr/lib/python3.8/site-packages/_pytest/fixtures.py:901: PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
  t/unit/test_compat.py::test_Publisher::test_constructor is using nose-specific method: `setup(self)`
  To remove this warning, rename it to `setup_method(self)`
  See docs: https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose
    fixture_result = next(generator)

[..more warnings about use deprecated nose..]

t/unit/utils/test_functional.py::test_retry_over_time::test_retry_always
  /usr/lib/python3.8/site-packages/_pytest/fixtures.py:901: PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
  t/unit/utils/test_functional.py::test_retry_over_time::test_retry_always is using nose-specific method: `setup(self)`
  To remove this warning, rename it to `setup_method(self)`
  See docs: https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose
    fixture_result = next(generator)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
SKIPPED [4] t/unit/asynchronous/aws/case.py:6: could not import 'pycurl': No module named 'pycurl'
SKIPPED [1] t/unit/asynchronous/http/test_curl.py:9: could not import 'pycurl': No module named 'pycurl'
SKIPPED [1] t/unit/transport/test_azureservicebus.py:12: could not import 'azure.servicebus': No module named 'azure'
SKIPPED [1] t/unit/transport/test_consul.py:9: could not import 'consul': No module named 'consul'
SKIPPED [1] t/unit/transport/test_etcd.py:8: could not import 'etcd': No module named 'etcd'
SKIPPED [1] t/unit/transport/test_librabbitmq.py:5: could not import 'librabbitmq': No module named 'librabbitmq'
SKIPPED [1] t/unit/transport/test_mongodb.py:9: could not import 'pymongo': No module named 'pymongo'
SKIPPED [1] t/unit/transport/test_redis.py:70: could not import 'redis': No module named 'redis'
SKIPPED [1] t/unit/transport/test_zookeeper.py:6: could not import 'kazoo': No module named 'kazoo'
SKIPPED [1] t/unit/test_compression.py:18: could not import 'brotli': No module named 'brotli'
SKIPPED [1] t/unit/test_compression.py:28: could not import 'zstandard': No module named 'zstandard'
SKIPPED [1] t/unit/test_compression.py:47: could not import 'brotli': No module named 'brotli'
SKIPPED [1] t/unit/test_compression.py:65: could not import 'zstandard': No module named 'zstandard'
SKIPPED [1] t/unit/test_connection.py:45: could not import 'redis': No module named 'redis'
SKIPPED [1] t/unit/test_connection.py:50: could not import 'pymongo': No module named 'pymongo'
SKIPPED [1] t/unit/test_connection.py:115: TODO: urllib cannot parse ipv6 urls
SKIPPED [1] t/unit/test_serialization.py:197: could not import 'msgpack': No module named 'msgpack'
SKIPPED [1] t/unit/test_serialization.py:205: could not import 'msgpack': No module named 'msgpack'
SKIPPED [1] t/unit/test_serialization.py:220: could not import 'yaml': No module named 'yaml'
SKIPPED [1] t/unit/test_serialization.py:228: could not import 'yaml': No module named 'yaml'
SKIPPED [1] t/unit/asynchronous/http/test_http.py:148: could not import 'pycurl': No module named 'pycurl'
SKIPPED [1] t/unit/transport/test_pyro.py:28: requires running Pyro nameserver and Kombu Broker
SKIPPED [1] t/unit/transport/test_pyro.py:65: requires running Pyro nameserver and Kombu Broker
SKIPPED [1] t/unit/transport/test_pyro.py:87: requires running Pyro nameserver and Kombu Broker
SKIPPED [164] t/unit/transport/test_qpid.py: Not supported in Python3
FAILED t/unit/test_connection.py::test_connection_utils::test_parse_generated_as_uri_pg
FAILED t/unit/transport/test_sqlalchemy.py::test_SqlAlchemy::test_url_parser
FAILED t/unit/transport/test_sqlalchemy.py::test_SqlAlchemy::test_simple_queueing
FAILED t/unit/transport/test_sqlalchemy.py::test_SqlAlchemy::test_clone - Imp...
=== 4 failed, 831 passed, 191 skipped, 1 deselected, 630 warnings in 17.75s ====

kloczek avatar Mar 19 '23 14:03 kloczek

that should have fixed in main branch. just a new release needed

auvipy avatar Mar 19 '23 16:03 auvipy

Is it anythong else on your outstanding list which needs to be done before make release new version? 😋

kloczek avatar Mar 22 '23 13:03 kloczek

I released a beta already

auvipy avatar Mar 23 '23 09:03 auvipy

Updated pytest output for 5.3.3. Now pytest is failing only in two units 😄

  • I've added to --ignore t/unit/transport/test_azurestoragequeues.py file to skip azure dependent units
  • looks t/unit/transport/test_SQS.py::test_Channel::test_get_async has mising pytest mark to skip if there is no pycurl
  • there are many warnings about use nose which is deprecated Here is pytest output:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-kombu-5.3.3-5.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-kombu-5.3.3-5.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network' -p no:randomly --ignore t/unit/transport/test_azurestoragequeues.py
============================= test session starts ==============================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/kombu-5.3.3
configfile: setup.cfg
testpaths: t/unit/
plugins: hypothesis-6.84.3, freezegun-0.4.2
collected 1141 items / 11 skipped

t/unit/test_clocks.py .....                                              [  0%]
t/unit/test_common.py .............................                      [  2%]
t/unit/test_compat.py ......................                             [  4%]
t/unit/test_compression.py ..s.s..s.s..                                  [  5%]
t/unit/test_connection.py ...s..............s........................... [  9%]
...................................................................      [ 15%]
t/unit/test_entity.py .................................................. [ 20%]
........                                                                 [ 20%]
t/unit/test_exceptions.py .                                              [ 21%]
t/unit/test_log.py ....................                                  [ 22%]
t/unit/test_matcher.py ...                                               [ 23%]
t/unit/test_message.py ....                                              [ 23%]
t/unit/test_messaging.py ............................................... [ 27%]
................                                                         [ 28%]
t/unit/test_mixins.py ....................                               [ 30%]
t/unit/test_pidbox.py ...........................                        [ 33%]
t/unit/test_pools.py .........................                           [ 35%]
t/unit/test_serialization.py ...............................             [ 37%]
t/unit/test_simple.py ............................                       [ 40%]
t/unit/asynchronous/test_hub.py ........................................ [ 43%]
.........                                                                [ 44%]
t/unit/asynchronous/test_semaphore.py .                                  [ 44%]
t/unit/asynchronous/test_timer.py ................                       [ 46%]
t/unit/asynchronous/http/test_http.py ............s                      [ 47%]
t/unit/transport/test_SQS.py ...................F.....................   [ 50%]
t/unit/transport/test_base.py ..............................             [ 53%]
t/unit/transport/test_filesystem.py ....                                 [ 53%]
t/unit/transport/test_memory.py ........                                 [ 54%]
t/unit/transport/test_pyamqp.py .........................                [ 56%]
t/unit/transport/test_pyro.py Fs.ss                                      [ 57%]
t/unit/transport/test_qpid.py ssssssssssssssssssssssssssssssssssssssssss [ 60%]
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 67%]
ssssssssssssssssssssssssssssssssssssssssssssssssss                       [ 71%]
t/unit/transport/test_redis.py ......................................... [ 75%]
........................................................................ [ 81%]
                                                                         [ 81%]
t/unit/transport/test_sqlalchemy.py ...                                  [ 81%]
t/unit/transport/test_transport.py ....                                  [ 82%]
t/unit/transport/virtual/test_base.py .................................. [ 85%]
............................                                             [ 87%]
t/unit/transport/virtual/test_exchange.py .........................      [ 89%]
t/unit/utils/test_amq_manager.py ...                                     [ 90%]
t/unit/utils/test_compat.py ......                                       [ 90%]
t/unit/utils/test_debug.py ..                                            [ 90%]
t/unit/utils/test_div.py ..                                              [ 90%]
t/unit/utils/test_encoding.py .........                                  [ 91%]
t/unit/utils/test_functional.py ..................................       [ 94%]
t/unit/utils/test_imports.py .....                                       [ 95%]
t/unit/utils/test_json.py ...........                                    [ 96%]
t/unit/utils/test_objects.py ...                                         [ 96%]
t/unit/utils/test_scheduling.py .......                                  [ 96%]
t/unit/utils/test_time.py ........                                       [ 97%]
t/unit/utils/test_url.py ...................                             [ 99%]
t/unit/utils/test_utils.py ......                                        [ 99%]
t/unit/utils/test_uuid.py ..                                             [100%]

=================================== FAILURES ===================================
_________________________ test_Channel.test_get_async __________________________

hub = <Hub@0x7f0cc1ef5e80: R:0 W:0>, kwargs = {}

    def get_client(hub: Hub | None = None, **kwargs: int) -> CurlClient:
        """Get or create HTTP client bound to the current event loop."""
        hub = hub or get_event_loop()
        try:
>           return hub._current_http_client
E           AttributeError: 'Hub' object has no attribute '_current_http_client'

kombu/asynchronous/http/__init__.py:25: AttributeError

During handling of the above exception, another exception occurred:

self = <t.unit.transport.test_SQS.test_Channel object at 0x7f0cca84bc10>

    @pytest.mark.usefixtures('hub')
    def test_get_async(self):
        """Basic coverage of async code typically used via:
        basic_consume > _loop1 > _schedule_queue > _get_bulk_async"""
        # Prepare
        for i in range(3):
            message = 'message: %s' % i
            self.producer.publish(message)

        # SQS.Channel.asynsqs constructs AsyncSQSConnection using self.sqs
        # which is already a mock thanks to `setup` above, we just need to
        # mock the async-specific methods (as test_AsyncSQSConnection does)
>       async_sqs_conn = self.channel.asynsqs(self.queue_name)

t/unit/transport/test_SQS.py:459:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
kombu/transport/SQS.py:795: in asynsqs
    c = self._asynsqs = AsyncSQSConnection(
kombu/asynchronous/aws/sqs/connection.py:22: in __init__
    super().__init__(
kombu/asynchronous/aws/connection.py:182: in __init__
    super().__init__(sqs_connection, http_client,
kombu/asynchronous/aws/connection.py:136: in __init__
    self._httpclient = http_client or get_client()
kombu/asynchronous/http/__init__.py:27: in get_client
    client = hub._current_http_client = Client(hub, **kwargs)
kombu/asynchronous/http/__init__.py:18: in Client
    return CurlClient(hub, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <kombu.asynchronous.http.curl.CurlClient object at 0x7f0cc1ea1430>
hub = <Hub@0x7f0cc1ef5e80: R:0 W:0>, max_clients = 10

    def __init__(self, hub: Hub | None = None, max_clients: int = 10):
        if pycurl is None:
>           raise ImportError('The curl client requires the pycurl library.')
E           ImportError: The curl client requires the pycurl library.

kombu/asynchronous/http/curl.py:43: ImportError
____________________ test_PyroTransport.test_driver_version ____________________

self = <t.unit.transport.test_pyro.test_PyroTransport object at 0x7f0cca8fbd30>

    def test_driver_version(self):
>       assert self.c.transport.driver_version()

t/unit/transport/test_pyro.py:28:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <kombu.transport.pyro.Transport object at 0x7f0cc1e09df0>

    def driver_version(self):
>       return pyro.__version__
E       AttributeError: 'NoneType' object has no attribute '__version__'

kombu/transport/pyro.py:147: AttributeError
=============================== warnings summary ===============================
../../../../../usr/lib/python3.8/site-packages/pytest_freezegun.py:17: 2282 warnings
t/unit/utils/test_json.py: 2 warnings
  /usr/lib/python3.8/site-packages/pytest_freezegun.py:17: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    if LooseVersion(pytest.__version__) < LooseVersion('3.6.0'):

t/unit/test_compat.py::test_Publisher::test_constructor
  /usr/lib/python3.8/site-packages/_pytest/fixtures.py:895: PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
  t/unit/test_compat.py::test_Publisher::test_constructor is using nose-specific method: `setup(self)`
  To remove this warning, rename it to `setup_method(self)`
  See docs: https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose
    fixture_result = next(generator)

[. rest of the units in which pytest which complains about use nose .] 
t/unit/test_connection.py::test_connection_utils::test_parse_url
t/unit/test_connection.py::test_connection_utils::test_parse_generated_as_uri
t/unit/test_connection.py::test_connection_utils::test_as_uri_when_prefix
t/unit/test_connection.py::test_connection_utils::test_as_uri_when_mongodb
t/unit/test_connection.py::test_connection_utils::test_bogus_scheme
t/unit/test_connection.py::test_connection_utils::test_rabbitmq_example_urls[amqp://user:pass@host:10000/vhost-expected0]
t/unit/test_connection.py::test_connection_utils::test_rabbitmq_example_urls[amqp://user%61:%61pass@ho%61st:10000/v%2fhost-expected1]
t/unit/test_connection.py::test_connection_utils::test_rabbitmq_example_urls[amqp://-expected2]
t/unit/test_connection.py::test_connection_utils::test_rabbitmq_example_urls[amqp://:@/-expected3]
t/unit/test_connection.py::test_connection_utils::test_rabbitmq_example_urls[amqp://user@/-expected4]
t/unit/test_connection.py::test_connection_utils::test_rabbitmq_example_urls[amqp://user:pass@/-expected5]
t/unit/test_connection.py::test_connection_utils::test_rabbitmq_example_urls[amqp://host-expected6]
t/unit/test_connection.py::test_connection_utils::test_rabbitmq_example_urls[amqp://:10000-expected7]
t/unit/test_connection.py::test_connection_utils::test_rabbitmq_example_urls[amqp:///vhost-expected8]
t/unit/test_connection.py::test_connection_utils::test_rabbitmq_example_urls[amqp://host/-expected9]
t/unit/test_connection.py::test_connection_utils::test_rabbitmq_example_urls[amqp://host/%2f-expected10]
t/unit/test_connection.py::test_connection_utils::test_sqs_example_urls[sqs://user:pass@-expected0]
t/unit/test_connection.py::test_connection_utils::test_sqs_example_urls[sqs://-expected1]
t/unit/test_connection.py::test_connection_utils::test_connection_copy
t/unit/test_connection.py::test_connection_utils::test_parse_generated_as_uri_pg
t/unit/test_connection.py::test_Connection::test_establish_connection
t/unit/test_connection.py::test_Connection::test_reuse_connection
t/unit/test_connection.py::test_Connection::test_connect_no_transport_options
t/unit/test_connection.py::test_Connection::test_connect_transport_options
t/unit/test_connection.py::test_Connection::test_multiple_urls
t/unit/test_connection.py::test_Connection::test_collect
t/unit/test_connection.py::test_Connection::test_prefer_librabbitmq_over_amqp_when_available
t/unit/test_connection.py::test_Connection::test_select_amqp_when_librabbitmq_is_not_available
t/unit/test_connection.py::test_Connection::test_collect_no_transport
t/unit/test_connection.py::test_Connection::test_collect_transport_gone
t/unit/test_connection.py::test_Connection::test_uri_passthrough
t/unit/test_connection.py::test_Connection::test_ensure_connection_on_error
t/unit/test_connection.py::test_Connection::test_supports_heartbeats
t/unit/test_connection.py::test_Connection::test_is_evented
t/unit/test_connection.py::test_Connection::test_register_with_event_loop
t/unit/test_connection.py::test_Connection::test_manager
t/unit/test_connection.py::test_Connection::test_copy
t/unit/test_connection.py::test_Connection::test_copy_multiples
t/unit/test_connection.py::test_Connection::test_switch
t/unit/test_connection.py::test_Connection::test_maybe_switch_next
t/unit/test_connection.py::test_Connection::test_maybe_switch_next_no_cycle
t/unit/test_connection.py::test_Connection::test_switch_without_uri_identifier
t/unit/test_connection.py::test_Connection::test_heartbeat_check
t/unit/test_connection.py::test_Connection::test_completes_cycle_no_cycle
t/unit/test_connection.py::test_Connection::test_completes_cycle
t/unit/test_connection.py::test_Connection::test_get_heartbeat_interval
t/unit/test_connection.py::test_Connection::test_supports_exchange_type
t/unit/test_connection.py::test_Connection::test_qos_semantics_matches_spec
t/unit/test_connection.py::test_Connection::test__enter____exit__
t/unit/test_connection.py::test_Connection::test_close_survives_connerror
t/unit/test_connection.py::test_Connection::test_close_when_default_channel
t/unit/test_connection.py::test_Connection::test_auto_reconnect_default_channel
t/unit/test_connection.py::test_Connection::test_close_when_default_channel_close_raises
t/unit/test_connection.py::test_Connection::test_revive_when_default_channel
t/unit/test_connection.py::test_Connection::test_ensure_connection
t/unit/test_connection.py::test_Connection::test_ensure_success
t/unit/test_connection.py::test_Connection::test_ensure_failure
t/unit/test_connection.py::test_Connection::test_ensure_connection_failure
t/unit/test_connection.py::test_Connection::test_ensure_retry_errors_is_limited_by_max_retries
t/unit/test_connection.py::test_Connection::test_autoretry
t/unit/test_connection.py::test_Connection::test_SimpleQueue
t/unit/test_connection.py::test_Connection::test_SimpleBuffer
t/unit/test_connection.py::test_Connection::test_SimpleQueue_with_parameters
t/unit/test_connection.py::test_Connection::test_SimpleBuffer_with_parameters
t/unit/test_connection.py::test_Connection::test_Producer
t/unit/test_connection.py::test_Connection::test_Consumer
t/unit/test_connection.py::test_Connection::test__repr__
t/unit/test_connection.py::test_Connection::test__reduce__
t/unit/test_connection.py::test_Connection::test_channel_errors
t/unit/test_connection.py::test_Connection::test_channel_errors__exception_no_cache
t/unit/test_connection.py::test_Connection::test_connection_errors
t/unit/test_connection.py::test_Connection::test_connection_errors__exception_no_cache
t/unit/test_connection.py::test_Connection::test_recoverable_connection_errors
t/unit/test_connection.py::test_Connection::test_recoverable_connection_errors__fallback
t/unit/test_connection.py::test_Connection::test_recoverable_connection_errors__exception_no_cache
t/unit/test_connection.py::test_Connection::test_recoverable_channel_errors
t/unit/test_connection.py::test_Connection::test_recoverable_channel_errors__fallback
t/unit/test_connection.py::test_Connection::test_recoverable_channel_errors__exception_no_cache
t/unit/test_connection.py::test_Connection::test_multiple_urls_hostname
t/unit/test_connection.py::test_Connection::test_connection_respect_its_timeout
t/unit/test_connection.py::test_Connection::test_connection_failover_without_total_timeout
t/unit/test_connection.py::test_Connection::test_connection_failover_with_total_timeout
t/unit/test_connection.py::test_Connection_with_transport_options::test_establish_connection
[/..]

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
SKIPPED [4] t/unit/asynchronous/aws/case.py:8: could not import 'pycurl': No module named 'pycurl'
SKIPPED [1] t/unit/asynchronous/http/test_curl.py:11: could not import 'pycurl': No module named 'pycurl'
SKIPPED [1] t/unit/transport/test_azureservicebus.py:14: could not import 'azure.servicebus': No module named 'azure'
SKIPPED [1] t/unit/transport/test_consul.py:11: could not import 'consul': No module named 'consul'
SKIPPED [1] t/unit/transport/test_etcd.py:10: could not import 'etcd': No module named 'etcd'
SKIPPED [1] t/unit/transport/test_librabbitmq.py:7: could not import 'librabbitmq': No module named 'librabbitmq'
SKIPPED [1] t/unit/transport/test_mongodb.py:11: could not import 'pymongo': No module named 'pymongo'
SKIPPED [1] t/unit/transport/test_zookeeper.py:8: could not import 'kazoo': No module named 'kazoo'
SKIPPED [1] t/unit/test_compression.py:20: could not import 'brotli': No module named 'brotli'
SKIPPED [1] t/unit/test_compression.py:30: could not import 'zstandard': No module named 'zstandard'
SKIPPED [1] t/unit/test_compression.py:49: could not import 'brotli': No module named 'brotli'
SKIPPED [1] t/unit/test_compression.py:67: could not import 'zstandard': No module named 'zstandard'
SKIPPED [1] t/unit/test_connection.py:52: could not import 'pymongo': No module named 'pymongo'
SKIPPED [1] t/unit/test_connection.py:117: TODO: urllib cannot parse ipv6 urls
SKIPPED [1] t/unit/asynchronous/http/test_http.py:150: could not import 'pycurl': No module named 'pycurl'
SKIPPED [1] t/unit/transport/test_pyro.py:30: requires running Pyro nameserver and Kombu Broker
SKIPPED [1] t/unit/transport/test_pyro.py:67: requires running Pyro nameserver and Kombu Broker
SKIPPED [1] t/unit/transport/test_pyro.py:89: requires running Pyro nameserver and Kombu Broker
SKIPPED [164] t/unit/transport/test_qpid.py: Not supported in Python3
FAILED t/unit/transport/test_SQS.py::test_Channel::test_get_async - ImportErr...
FAILED t/unit/transport/test_pyro.py::test_PyroTransport::test_driver_version
========== 2 failed, 965 passed, 185 skipped, 3051 warnings in 26.77s ==========

kloczek avatar Nov 06 '23 14:11 kloczek

you can fix "ImportError: The curl client requires the pycurl library." with just installing pycurl

auvipy avatar Nov 06 '23 15:11 auvipy

you can fix "ImportError: The curl client requires the pycurl library." with just installing pycurl

Yes I know. I'm only pointing that there some other units which are skipped if this module is not installed

SKIPPED [4] t/unit/asynchronous/aws/case.py:8: could not import 'pycurl': No module named 'pycurl'
SKIPPED [1] t/unit/asynchronous/http/test_curl.py:11: could not import 'pycurl': No module named 'pycurl'

kloczek avatar Nov 06 '23 18:11 kloczek

that's totally fine. your reports are helping is fixing those slowly but eventually!! so thanks for your reports and findings for last years!

auvipy avatar Nov 07 '23 06:11 auvipy