MCPcopy
hub / github.com/celery/celery / sanity_stdouts

Function sanity_stdouts

t/unit/conftest.py:231–245  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

229
230@pytest.fixture(autouse=True)
231def sanity_stdouts(request):
232 yield
233
234 from celery.utils.log import LoggingProxy
235 assert sys.stdout
236 assert sys.stderr
237 assert sys.__stdout__
238 assert sys.__stderr__
239 this = request.node.name
240 if isinstance(sys.stdout, (LoggingProxy, Mock)) or \
241 isinstance(sys.__stdout__, (LoggingProxy, Mock)):
242 raise RuntimeError(CASE_LOG_REDIRECT_EFFECT.format(this, 'stdout'))
243 if isinstance(sys.stderr, (LoggingProxy, Mock)) or \
244 isinstance(sys.__stderr__, (LoggingProxy, Mock)):
245 raise RuntimeError(CASE_LOG_REDIRECT_EFFECT.format(this, 'stderr'))
246
247
248@pytest.fixture(autouse=True)

Callers

nothing calls this directly

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…