Remove unicode literal compat code
This commit is contained in:
parent
1f3ab118fa
commit
815dd19fb4
|
@ -1,13 +1,10 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import sys
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
sublogger = logging.getLogger(__name__+'.baz')
|
sublogger = logging.getLogger(__name__+'.baz')
|
||||||
|
|
||||||
u = (lambda x: x.decode('utf-8')) if sys.version_info < (3,) else (lambda x: x)
|
|
||||||
|
|
||||||
|
|
||||||
def test_fixture_help(testdir):
|
def test_fixture_help(testdir):
|
||||||
result = testdir.runpytest('--fixtures')
|
result = testdir.runpytest('--fixtures')
|
||||||
|
@ -60,14 +57,14 @@ def test_record_tuples(caplog):
|
||||||
|
|
||||||
|
|
||||||
def test_unicode(caplog):
|
def test_unicode(caplog):
|
||||||
logger.info(u('bū'))
|
logger.info(u'bū')
|
||||||
assert caplog.records[0].levelname == 'INFO'
|
assert caplog.records[0].levelname == 'INFO'
|
||||||
assert caplog.records[0].msg == u('bū')
|
assert caplog.records[0].msg == u'bū'
|
||||||
assert u('bū') in caplog.text
|
assert u'bū' in caplog.text
|
||||||
|
|
||||||
|
|
||||||
def test_clear(caplog):
|
def test_clear(caplog):
|
||||||
logger.info(u('bū'))
|
logger.info(u'bū')
|
||||||
assert len(caplog.records)
|
assert len(caplog.records)
|
||||||
caplog.clear()
|
caplog.clear()
|
||||||
assert not len(caplog.records)
|
assert not len(caplog.records)
|
||||||
|
|
Loading…
Reference in New Issue