

def test_set_before(self):
    logger = logging.getLogger('no-such-logger-set')
    fix.setLevel(logging.ERROR)
    self.assertEqual(logging.ERROR, logger.level)
    fix = fixture.SetLogLevel(['no-such-logger-set'], logging.DEBUG)
    with fix:
        self.assertEqual(logging.DEBUG, logger.level)
    self.assertEqual(logging.ERROR, logger.level)

dataset/ETHPy150Open openstack/oslo.log/oslo_log/tests/unit/fixture/test_setlevel.py TestSetLevelFixture.test_set_before/VarMisuse@19/31 `logger`->`fix`