Skip to content

Commit

Permalink
test: Don't request 'catchlog' through 'pytest_plugins'
Browse files Browse the repository at this point in the history
  • Loading branch information
abusalimov committed Oct 12, 2015
1 parent 83eb180 commit 944b68b
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions test_pytest_catchlog.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import py

pytest_plugins = 'pytester', 'catchlog'
pytest_plugins = 'pytester'


def test_nothing_logged(testdir):
testdir.makepyfile('''
import sys
import logging
pytest_plugins = 'catchlog'
def test_foo():
sys.stdout.write('text going to stdout')
sys.stderr.write('text going to stderr')
Expand All @@ -30,8 +28,6 @@ def test_messages_logged(testdir):
import sys
import logging
pytest_plugins = 'catchlog'
def test_foo():
sys.stdout.write('text going to stdout')
sys.stderr.write('text going to stderr')
Expand All @@ -53,8 +49,6 @@ def test_setup_logging(testdir):
import sys
import logging
pytest_plugins = 'catchlog'
def setup_function(function):
logging.getLogger().info('text going to logger from setup')
Expand All @@ -75,8 +69,6 @@ def test_teardown_logging(testdir):
import sys
import logging
pytest_plugins = 'catchlog'
def test_foo():
logging.getLogger().info('text going to logger from call')
Expand All @@ -97,8 +89,6 @@ def test_change_level(testdir):
import sys
import logging
pytest_plugins = 'catchlog'
def test_foo(caplog):
caplog.set_level(logging.INFO)
log = logging.getLogger()
Expand Down Expand Up @@ -130,8 +120,6 @@ def test_with_statement(testdir):
import sys
import logging
pytest_plugins = 'catchlog'
def test_foo(caplog):
with caplog.at_level(logging.INFO):
log = logging.getLogger()
Expand Down Expand Up @@ -161,8 +149,6 @@ def test_log_access(testdir):
import sys
import logging
pytest_plugins = 'catchlog'
def test_foo(caplog):
logging.getLogger().info('boo %s', 'arg')
assert caplog.records()[0].levelname == 'INFO'
Expand All @@ -183,8 +169,6 @@ def test_record_tuples(testdir):
import sys
import logging
pytest_plugins = 'catchlog'
def test_foo(caplog):
logging.getLogger().info('boo %s', 'arg')
Expand All @@ -201,8 +185,6 @@ def test_disable_log_capturing(testdir):
import sys
import logging
pytest_plugins = 'catchlog'
def test_foo(caplog):
sys.stdout.write('text going to stdout')
logging.getLogger().warning('catch me if you can!')
Expand Down

0 comments on commit 944b68b

Please sign in to comment.