Skip to content

Pytest 3.3: root logger has wrong logging level #2977

@noahl

Description

@noahl

In Pytest 3.3, the following test case fails:

    def test_default_level(self):
        self.assertEqual(logging.getLogger().getEffectiveLevel(),
                         logging.WARNING)

It passes in Pytest 3.2. The Python documentation (https://docs.python.org/3.6/library/logging.html#logging.Logger.setLevel) says that the root logger is created with level WARNING, so I believe this is a bug in pytest.

I think this is likely related to #2974 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: loggingrelated to the logging builtin plugintype: bugproblem that needs to be addressed

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions