Debian Codegraph @

pypy/module/__pypy__/test/test_stderrprinter.py

raw symbols SCIP
1 def app_test_stderrprinter():
2 from __pypy__ import StdErrPrinter
3
4 p = StdErrPrinter(2)
5 assert repr(p).startswith("<StdErrPrinter(fd=2) object at")
6
7 p.close() # this should be a no-op
8 p.flush() # this should be a no-op
9 assert p.fileno() == 2
10 assert p.write('foo') == 3
11 raises(TypeError, p.write, b'foo')
12
13 assert not p.closed
14 assert p.encoding is None
15 assert p.mode == 'w'