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

Method test_intermingling

testing/test_capture.py:1219–1231  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1217 )
1218
1219 def test_intermingling(self):
1220 with self.getcapture() as cap:
1221 os.write(1, b"1")
1222 sys.stdout.write(str(2))
1223 sys.stdout.flush()
1224 os.write(1, b"3")
1225 os.write(2, b"a")
1226 sys.stderr.write("b")
1227 sys.stderr.flush()
1228 os.write(2, b"c")
1229 out, err = cap.readouterr()
1230 assert out == "123"
1231 assert err == "abc"
1232
1233 def test_many(self, capfd):
1234 with lsof_check():

Callers

nothing calls this directly

Calls 4

getcaptureMethod · 0.80
writeMethod · 0.45
flushMethod · 0.45
readouterrMethod · 0.45

Tested by

no test coverage detected