fname
stringlengths
63
176
rel_fname
stringclasses
706 values
line
int64
-1
4.5k
name
stringlengths
1
81
kind
stringclasses
2 values
category
stringclasses
2 values
info
stringlengths
0
77.9k
⌀
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
30
saferepr
ref
function
s = saferepr(("*" * 50, A()), maxsize=25)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
30
A
ref
function
s = saferepr(("*" * 50, A()), maxsize=25)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
35
test_exceptions
def
function
def test_exceptions() -> None: class BrokenRepr: def __init__(self, ex): self.ex = ex def __repr__(self): raise self.ex class BrokenReprException(Exception): __str__ = None # type: ignore[assignment] __repr__ = None # type: ignore[assignment] asse...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
36
BrokenRepr
def
class
__init__ __repr__
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
43
BrokenReprException
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
47
saferepr
ref
function
assert "Exception" in saferepr(BrokenRepr(Exception("broken")))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
47
BrokenRepr
ref
function
assert "Exception" in saferepr(BrokenRepr(Exception("broken")))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
48
saferepr
ref
function
s = saferepr(BrokenReprException("really broken"))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
48
BrokenReprException
ref
function
s = saferepr(BrokenReprException("really broken"))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
50
saferepr
ref
function
assert "TypeError" in saferepr(BrokenRepr("string"))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
50
BrokenRepr
ref
function
assert "TypeError" in saferepr(BrokenRepr("string"))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
54
none
ref
function
none() # type: ignore[misc]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
57
BrokenRepr
ref
function
obj = BrokenRepr(BrokenReprException("omg even worse"))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
57
BrokenReprException
ref
function
obj = BrokenRepr(BrokenReprException("omg even worse"))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
58
saferepr
ref
function
s2 = saferepr(obj)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
66
test_baseexception
def
function
def test_baseexception(): """Test saferepr() with BaseExceptions, which includes pytest outcomes.""" class RaisingOnStrRepr(BaseException): def __init__(self, exc_types): self.exc_types = exc_types def raise_exc(self, *args): try: self.exc_type = self.ex...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
69
RaisingOnStrRepr
def
class
__init__ raise_exc __str__ __repr__
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
73
raise_exc
def
function
def raise_exc(self, *args): try: self.exc_type = self.exc_types.pop(0) except IndexError: pass if hasattr(self.exc_type, "__call__"): raise self.exc_type(*args) raise self.exc_type def __str__(self): ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
79
exc_type
ref
function
raise self.exc_type(*args)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
83
raise_exc
ref
function
self.raise_exc("__str__")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
86
raise_exc
ref
function
self.raise_exc("__repr__")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
88
BrokenObj
def
class
__init__ __repr__
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
98
BrokenObj
ref
function
obj = BrokenObj(RaisingOnStrRepr([BaseException]))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
98
RaisingOnStrRepr
ref
function
obj = BrokenObj(RaisingOnStrRepr([BaseException]))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
99
saferepr
ref
function
assert saferepr(obj) == (
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
103
BrokenObj
ref
function
obj = BrokenObj(RaisingOnStrRepr([RaisingOnStrRepr([BaseException])]))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
103
RaisingOnStrRepr
ref
function
obj = BrokenObj(RaisingOnStrRepr([RaisingOnStrRepr([BaseException])]))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
103
RaisingOnStrRepr
ref
function
obj = BrokenObj(RaisingOnStrRepr([RaisingOnStrRepr([BaseException])]))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
104
saferepr
ref
function
assert saferepr(obj) == (
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
110
raises
ref
function
with pytest.raises(KeyboardInterrupt):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
111
saferepr
ref
function
saferepr(BrokenObj(KeyboardInterrupt()))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
111
BrokenObj
ref
function
saferepr(BrokenObj(KeyboardInterrupt()))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
113
raises
ref
function
with pytest.raises(SystemExit):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
114
saferepr
ref
function
saferepr(BrokenObj(SystemExit()))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
114
BrokenObj
ref
function
saferepr(BrokenObj(SystemExit()))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
116
raises
ref
function
with pytest.raises(KeyboardInterrupt):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
117
saferepr
ref
function
saferepr(BrokenObj(RaisingOnStrRepr([KeyboardInterrupt])))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
117
BrokenObj
ref
function
saferepr(BrokenObj(RaisingOnStrRepr([KeyboardInterrupt])))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
117
RaisingOnStrRepr
ref
function
saferepr(BrokenObj(RaisingOnStrRepr([KeyboardInterrupt])))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
119
raises
ref
function
with pytest.raises(SystemExit):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
120
saferepr
ref
function
saferepr(BrokenObj(RaisingOnStrRepr([SystemExit])))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
120
BrokenObj
ref
function
saferepr(BrokenObj(RaisingOnStrRepr([SystemExit])))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
120
RaisingOnStrRepr
ref
function
saferepr(BrokenObj(RaisingOnStrRepr([SystemExit])))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
122
raises
ref
function
with pytest.raises(KeyboardInterrupt):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
123
saferepr
ref
function
print(saferepr(BrokenObj(RaisingOnStrRepr([BaseException, KeyboardInterrupt]))))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
123
BrokenObj
ref
function
print(saferepr(BrokenObj(RaisingOnStrRepr([BaseException, KeyboardInterrupt]))))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
123
RaisingOnStrRepr
ref
function
print(saferepr(BrokenObj(RaisingOnStrRepr([BaseException, KeyboardInterrupt]))))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
125
raises
ref
function
with pytest.raises(SystemExit):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
126
saferepr
ref
function
saferepr(BrokenObj(RaisingOnStrRepr([BaseException, SystemExit])))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
126
BrokenObj
ref
function
saferepr(BrokenObj(RaisingOnStrRepr([BaseException, SystemExit])))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
126
RaisingOnStrRepr
ref
function
saferepr(BrokenObj(RaisingOnStrRepr([BaseException, SystemExit])))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
129
test_buggy_builtin_repr
def
function
def test_buggy_builtin_repr(): # Simulate a case where a repr for a builtin raises. # reprlib dispatches by type name, so use "int". class int: def __repr__(self): raise ValueError("Buggy repr!") assert "Buggy" in saferepr(int())
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
137
saferepr
ref
function
assert "Buggy" in saferepr(int())
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
140
test_big_repr
def
function
def test_big_repr(): from _pytest._io.saferepr import SafeRepr assert len(saferepr(range(1000))) <= len("[" + SafeRepr(0).maxlist * "1000" + "]")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
143
saferepr
ref
function
assert len(saferepr(range(1000))) <= len("[" + SafeRepr(0).maxlist * "1000" + "]")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
143
SafeRepr
ref
function
assert len(saferepr(range(1000))) <= len("[" + SafeRepr(0).maxlist * "1000" + "]")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
146
test_repr_on_newstyle
def
function
def test_repr_on_newstyle() -> None: class Function: def __repr__(self): return "<%s>" % (self.name) # type: ignore[attr-defined] assert saferepr(Function())
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
147
Function
def
class
__repr__
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
151
saferepr
ref
function
assert saferepr(Function())
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
151
Function
ref
function
assert saferepr(Function())
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
154
test_unicode
def
function
def test_unicode(): val = "£€" reprval = "'£€'" assert saferepr(val) == reprval
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
157
saferepr
ref
function
assert saferepr(val) == reprval
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
160
test_pformat_dispatch
def
function
def test_pformat_dispatch(): assert _pformat_dispatch("a") == "'a'" assert _pformat_dispatch("a" * 10, width=5) == "'aaaaaaaaaa'" assert _pformat_dispatch("foo bar", width=5) == "('foo '\n 'bar')"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
161
_pformat_dispatch
ref
function
assert _pformat_dispatch("a") == "'a'"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
162
_pformat_dispatch
ref
function
assert _pformat_dispatch("a" * 10, width=5) == "'aaaaaaaaaa'"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
163
_pformat_dispatch
ref
function
assert _pformat_dispatch("foo bar", width=5) == "('foo '\n 'bar')"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
166
test_broken_getattribute
def
function
def test_broken_getattribute(): """saferepr() can create proper representations of classes with broken __getattribute__ (#7145) """ class SomeClass: def __getattribute__(self, attr): raise RuntimeError def __repr__(self): raise RuntimeError assert saferepr(...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
171
SomeClass
def
class
__getattribute__ __repr__
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
178
saferepr
ref
function
assert saferepr(SomeClass()).startswith(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py
testing/io/test_saferepr.py
178
SomeClass
ref
function
assert saferepr(SomeClass()).startswith(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
17
test_terminal_width_COLUMNS
def
function
def test_terminal_width_COLUMNS(monkeypatch: MonkeyPatch) -> None: monkeypatch.setenv("COLUMNS", "42") assert terminalwriter.get_terminal_width() == 42 monkeypatch.delenv("COLUMNS", raising=_False)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
18
setenv
ref
function
monkeypatch.setenv("COLUMNS", "42")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
19
get_terminal_width
ref
function
assert terminalwriter.get_terminal_width() == 42
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
20
delenv
ref
function
monkeypatch.delenv("COLUMNS", raising=False)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
23
test_terminalwriter_width_bogus
def
function
def test_terminalwriter_width_bogus(monkeypatch: MonkeyPatch) -> None: monkeypatch.setattr(shutil, "get_terminal_size", mock.Mock(return_value=(10, 10))) monkeypatch.delenv("COLUMNS", raising=_False) tw = terminalwriter.TerminalWriter() assert tw.fullwidth == 80
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
25
delenv
ref
function
monkeypatch.delenv("COLUMNS", raising=False)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
26
TerminalWriter
ref
function
tw = terminalwriter.TerminalWriter()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
30
test_terminalwriter_computes_width
def
function
def test_terminalwriter_computes_width(monkeypatch: MonkeyPatch) -> None: monkeypatch.setattr(terminalwriter, "get_terminal_width", lambda: 42) tw = terminalwriter.TerminalWriter() assert tw.fullwidth == 42
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
32
TerminalWriter
ref
function
tw = terminalwriter.TerminalWriter()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
36
test_terminalwriter_dumb_term_no_markup
def
function
def test_terminalwriter_dumb_term_no_markup(monkeypatch: MonkeyPatch) -> None: monkeypatch.setattr(os, "environ", {"TERM": "dumb", "PATH": ""}) class MyFile: closed = _False def isatty(self): return _True with monkeypatch.context() as m: m.setattr(sys, "stdout", MyFile...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
39
MyFile
def
class
isatty
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
45
context
ref
function
with monkeypatch.context() as m:
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
46
MyFile
ref
function
m.setattr(sys, "stdout", MyFile())
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
48
TerminalWriter
ref
function
tw = terminalwriter.TerminalWriter()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
52
test_terminalwriter_not_unicode
def
function
def test_terminalwriter_not_unicode() -> None: """If the file doesn't support Unicode, the string is unicode-escaped (#7475).""" buffer = io.BytesIO() file = io.TextIOWrapper(buffer, encoding="cp1252") tw = terminalwriter.TerminalWriter(file) tw.write("hello 🌀 wôrld אבג", flush=_True) assert bu...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
54
BytesIO
ref
function
buffer = io.BytesIO()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
55
TextIOWrapper
ref
function
file = io.TextIOWrapper(buffer, encoding="cp1252")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
56
TerminalWriter
ref
function
tw = terminalwriter.TerminalWriter(file)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
58
getvalue
ref
function
assert buffer.getvalue() == br"hello \U0001f300 w\xf4rld \u05d0\u05d1\u05d2"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
64
TestTerminalWriter
def
class
tw test_line test_line_unicode test_sep_no_title test_sep_with_title test_sep_longer_than_width test_markup test_markup_bad test_line_write_markup test_attr_fullwidth
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
65
fixture
ref
function
@pytest.fixture(params=["path", "stringio"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
66
tw
def
function
def tw( self, request, tmp_path: Path ) -> Generator[terminalwriter.TerminalWriter, None, None]: if request.param == "path": p = tmp_path.joinpath("tmpfile") f = open(str(p), "w+", encoding="utf8") tw = terminalwriter.TerminalWriter(f) def getline...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
72
TerminalWriter
ref
function
tw = terminalwriter.TerminalWriter(f)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
74
getlines
def
function
def getlines(): f.flush() with open(str(p), encoding="utf8") as fp: return fp.readlines() elif request.param == "stringio": f = io.StringIO() tw = terminalwriter.TerminalWriter(f) def getlines(): ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
75
flush
ref
function
f.flush()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
77
readlines
ref
function
return fp.readlines()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
80
StringIO
ref
function
f = io.StringIO()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
81
TerminalWriter
ref
function
tw = terminalwriter.TerminalWriter(f)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
83
getlines
def
function
def getlines(): f.flush() with open(str(p), encoding="utf8") as fp: return fp.readlines() elif request.param == "stringio": f = io.StringIO() tw = terminalwriter.TerminalWriter(f) def getlines(): ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
84
seek
ref
function
f.seek(0)