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 failures in test_camel_case_aliases and test_foo #76

Closed
hlef opened this issue Mar 30, 2018 · 4 comments
Closed

Test failures in test_camel_case_aliases and test_foo #76

hlef opened this issue Mar 30, 2018 · 4 comments

Comments

@hlef
Copy link

hlef commented Mar 30, 2018

Hi,

The Debian python-catchlog package currently fails to build from source in unstable because of broken tests:

...
I: pybuild base:184: python2.7 -m pytest -v -x
============================= test session starts ==============================
platform linux2 -- Python 2.7.14+, pytest-3.3.2, py-1.5.2, pluggy-0.6.0 -- /usr/bin/python2.7
cachedir: .cache
rootdir: /build/1st/pytest-catchlog-1.2.2+git20170915, inifile:
plugins: catchlog-1.2.2
collecting ... collected 25 items

tests/test_compat.py::test_camel_case_aliases FAILED                     [  4%]

=================================== FAILURES ===================================
___________________________ test_camel_case_aliases ____________________________

testdir = <Testdir local('/tmp/pytest-of-pbuilder1/pytest-0/test_camel_case_aliases0')>

    def test_camel_case_aliases(testdir):
        testdir.makepyfile('''
            import logging
    
            logger = logging.getLogger(__name__)
    
            def test_foo(caplog):
                caplog.setLevel(logging.INFO)
                logger.debug('boo!')
    
                with caplog.atLevel(logging.WARNING):
                    logger.info('catch me if you can')
            ''')
        result = testdir.runpytest()
>       assert result.ret == 0
E       assert 1 == 0
E        +  where 1 = <_pytest.pytester.RunResult instance at 0x7f8b617edcf8>.ret

/build/1st/pytest-catchlog-1.2.2+git20170915/tests/test_compat.py:19: AssertionError
----------------------------- Captured stdout call -----------------------------
============================= test session starts ==============================
platform linux2 -- Python 2.7.14+, pytest-3.3.2, py-1.5.2, pluggy-0.6.0
rootdir: /tmp/pytest-of-pbuilder1/pytest-0/test_camel_case_aliases0, inifile:
plugins: catchlog-1.2.2
collected 1 item

test_camel_case_aliases.py F                                             [100%]

=================================== FAILURES ===================================
___________________________________ test_foo ___________________________________

caplog = <_pytest.logging.LogCaptureFixture object at 0x7f8b618820d0>

    def test_foo(caplog):
>       caplog.setLevel(logging.INFO)
E       AttributeError: 'LogCaptureFixture' object has no attribute 'setLevel'

test_camel_case_aliases.py:6: AttributeError
=============================== warnings summary ===============================
None
  pytest-catchlog plugin has been merged into the core, please remove it from your requirements.

-- Docs: http://doc.pytest.org/en/latest/warnings.html
===================== 1 failed, 1 warnings in 0.34 seconds =====================
=============================== warnings summary ===============================
None
  pytest-catchlog plugin has been merged into the core, please remove it from your requirements.

-- Docs: http://doc.pytest.org/en/latest/warnings.html
===================== 1 failed, 1 warnings in 2.64 seconds =====================
E: pybuild pybuild:283: test: plugin custom failed with: exit code=1: python2.7 -m pytest -v -x
dh_auto_test: pybuild --test --test-pytest -i python{version} -p 2.7 returned exit code 13
make[1]: *** [debian/rules:17: override_dh_auto_install] Error 25

You can find a complete build log here (tests are at the end).

I suspect incompatibilities with pytest version 3.3.2 (package was building fine with 3.2.5).

This is an urgent situation, without patch the python-catchlog package will be removed from unstable along with all its dependencies in 25 days.

Thanks for your work !

Regards,
Hugo

@The-Compiler
Copy link
Collaborator

Like the note in the output says:

pytest-catchlog plugin has been merged into the core, please remove it from your requirements.

So if you ship pytest 3.3.2, there's probably no reason to have a pytest-catchlog package.

@hlef
Copy link
Author

hlef commented Mar 30, 2018

Oh, right, my bad. So, the pytest-catchlog package has no reasons of existing if we ship pytest 3.3.2.

Thanks for the quick answer.

@twmr
Copy link

twmr commented Jun 24, 2018

@hlef, can you close this issue?

@The-Compiler
Copy link
Collaborator

Closing this as the catchlog plugin as maintained inside pytest doesn't seem to have this issue, and this plugin is unmaintained.

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

No branches or pull requests

3 participants