MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_dontreadfrominput_has_encoding

Function test_dontreadfrominput_has_encoding

testing/test_capture.py:1451–1462  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

1449
1450
1451def test_dontreadfrominput_has_encoding(pytester: Pytester) -> None:
1452 pytester.makepyfile(
1453 """
1454 import sys
1455 def test_capattr():
1456 # should not raise AttributeError
1457 assert sys.stdout.encoding
1458 assert sys.stderr.encoding
1459 """
1460 )
1461 reprec = pytester.inline_run()
1462 reprec.assertoutcome(passed=1)
1463
1464
1465def test_crash_on_closing_tmpfile_py27(

Callers

nothing calls this directly

Calls 3

assertoutcomeMethod · 0.80
makepyfileMethod · 0.45
inline_runMethod · 0.45

Tested by

no test coverage detected