Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test regression testMethod=test_logger in 1.8.4 #153

Closed
anthraxx opened this issue Dec 13, 2017 · 5 comments
Closed

test regression testMethod=test_logger in 1.8.4 #153

anthraxx opened this issue Dec 13, 2017 · 5 comments
Labels

Comments

@anthraxx
Copy link

Hi, since 1.8.4 i encountered a regression visible through the test suite:

============================= test session starts ==============================
platform linux -- Python 3.6.3, pytest-3.3.1, py-1.5.0, pluggy-0.6.0
rootdir: /build/python-socketio/src/python-socketio-1.8.4, inifile:
collected 274 items

tests/test_asyncio_manager.py ........................                   [  8%]
tests/test_asyncio_namespace.py ............                             [ 13%]
tests/test_asyncio_pubsub_manager.py ........................            [ 21%]
tests/test_asyncio_redis_manager.py ..........                           [ 25%]
tests/test_asyncio_server.py ........................................... [ 41%]
..F..........                                                            [ 45%]
tests/test_base_manager.py ........................                      [ 54%]
tests/test_middleware.py ...                                             [ 55%]
tests/test_namespace.py ...........                                      [ 59%]
tests/test_packet.py ................................                    [ 71%]
tests/test_pubsub_manager.py ........................                    [ 80%]
tests/test_server.py ...........................................F....... [ 98%]
...                                                                      [100%]

=================================== FAILURES ===================================
_________________________ TestAsyncServer.test_logger __________________________

self = <tests.test_asyncio_server.TestAsyncServer testMethod=test_logger>
eio = <MagicMock name='AsyncServer' id='105862967207136'>

    def test_logger(self, eio):
        s = asyncio_server.AsyncServer(logger=False)
>       self.assertEqual(s.logger.getEffectiveLevel(), logging.ERROR)
E       AssertionError: 0 != 40

tests/test_asyncio_server.py:545: AssertionError
____________________________ TestServer.test_logger ____________________________

self = <tests.test_server.TestServer testMethod=test_logger>
eio = <MagicMock name='Server' id='105862968100344'>

    def test_logger(self, eio):
        s = server.Server(logger=False)
>       self.assertEqual(s.logger.getEffectiveLevel(), logging.ERROR)
E       AssertionError: 0 != 40

tests/test_server.py:459: AssertionError

@miguelgrinberg
Copy link
Owner

That's weird. There were no logging changes in 1.8.4, and besides, that test continues to pass on Travis.

@anthraxx
Copy link
Author

@miguelgrinberg interesting, not sure why, maybe because of some kind of stdout hooking, but using pytest to run the tests leads to this behavior while using setup.py test lets it pass

@miguelgrinberg
Copy link
Owner

But you are saying that with 1.8.3 still under pytest this test did not fail?

@anthraxx
Copy link
Author

anthraxx commented Dec 14, 2017

@miguelgrinberg apparently this is a feature since pytest 3.3.0 named catchlog and socketio 1.8.3 was back then build with pytest 3.2.x
https://github.com/pytest-dev/pytest/blame/master/CHANGELOG.rst#L113
pytest-dev/pytest#2794

@miguelgrinberg
Copy link
Owner

This issue will be automatically closed due to being inactive for more than six months. Seeing that I haven't responded to your last comment, it is quite possible that I have dropped the ball on this issue and I apologize about that. If that is the case, do not take the closing of the issue personally as it is an automated process doing it, just reopen it and I'll get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants