Skip to content

Commit 182f0ba

Browse files
committed
output actually stored
1 parent 3bd72f0 commit 182f0ba

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

pytest_django/fixtures.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@
55
import os
66
import sys
77
from contextlib import contextmanager
8-
from io import BytesIO
8+
from io import StringIO
99

1010
import pytest
1111

12-
from contextlib import contextmanager
13-
1412
from . import live_server_helper
1513

1614
from .django_compat import is_django_unittest
@@ -122,9 +120,9 @@ def run_checks(request):
122120
return
123121
run_checks.ran = True
124122

125-
out = BytesIO()
123+
out = StringIO()
126124
try:
127-
call_command('check', out=out, err=out)
125+
call_command('check', stdout=out, stderr=out)
128126
except SystemCheckError as ex:
129127
run_checks.exc = ex
130128

@@ -140,16 +138,6 @@ def run_checks(request):
140138
request.session.shouldstop = True
141139

142140

143-
@contextmanager
144-
def disable_input_capture(request):
145-
capmanager = request.config.pluginmanager.getplugin('capturemanager')
146-
capmanager.suspendcapture()
147-
try:
148-
yield
149-
finally:
150-
capmanager.resumecapture()
151-
152-
153141
def _django_db_fixture_helper(transactional, request, django_db_blocker):
154142
if is_django_unittest(request):
155143
return

0 commit comments

Comments
 (0)