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_terminalwriter.py
testing/io/test_terminalwriter.py
85
readlines
ref
function
return f.readlines()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
88
getlines
ref
function
tw.getvalue = lambda: "".join(getlines()) # type: ignore
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
93
test_line
def
function
def test_line(self, tw) -> None: tw.line("hello") lines = tw.getlines() assert len(lines) == 1 assert lines[0] == "hello\n" def test_line_unicode(self, tw) -> None: msg = "b\u00f6y" tw.line(msg) lines = tw.getlines() assert lines[0] == msg + "\n" ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
94
line
ref
function
tw.line("hello")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
95
getlines
ref
function
lines = tw.getlines()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
99
test_line_unicode
def
function
def test_line_unicode(self, tw) -> None: msg = "b\u00f6y" tw.line(msg) lines = tw.getlines() assert lines[0] == msg + "\n" def test_sep_no_title(self, tw) -> None: tw.sep("-", fullwidth=60) lines = tw.getlines() assert len(lines) == 1 assert lines...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
101
line
ref
function
tw.line(msg)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
102
getlines
ref
function
lines = tw.getlines()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
105
test_sep_no_title
def
function
def test_sep_no_title(self, tw) -> None: tw.sep("-", fullwidth=60) lines = tw.getlines() assert len(lines) == 1 assert lines[0] == "-" * (60 - win32) + "\n" def test_sep_with_title(self, tw) -> None: tw.sep("-", "hello", fullwidth=60) lines = tw.getlines() ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
106
sep
ref
function
tw.sep("-", fullwidth=60)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
107
getlines
ref
function
lines = tw.getlines()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
111
test_sep_with_title
def
function
def test_sep_with_title(self, tw) -> None: tw.sep("-", "hello", fullwidth=60) lines = tw.getlines() assert len(lines) == 1 assert lines[0] == "-" * 26 + " hello " + "-" * (27 - win32) + "\n" def test_sep_longer_than_width(self, tw) -> None: tw.sep("-", "a" * 10, fullwidt...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
112
sep
ref
function
tw.sep("-", "hello", fullwidth=60)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
113
getlines
ref
function
lines = tw.getlines()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
117
test_sep_longer_than_width
def
function
def test_sep_longer_than_width(self, tw) -> None: tw.sep("-", "a" * 10, fullwidth=5) (line,) = tw.getlines() # even though the string is wider than the line, still have a separator assert line == "- aaaaaaaaaa -\n" @pytest.mark.skipif(sys.platform == "win32", reason="win32 has n...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
118
sep
ref
function
tw.sep("-", "a" * 10, fullwidth=5)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
119
getlines
ref
function
(line,) = tw.getlines()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
123
skipif
ref
function
@pytest.mark.skipif(sys.platform == "win32", reason="win32 has no native ansi")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
124
parametrize
ref
function
@pytest.mark.parametrize("bold", (True, False))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
125
parametrize
ref
function
@pytest.mark.parametrize("color", ("red", "green"))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
126
test_markup
def
function
def test_markup(self, tw, bold: bool, color: str) -> None: text = tw.markup("hello", **{color: _True, "bold": bold}) assert "hello" in text def test_markup_bad(self, tw) -> None: with pytest.raises(ValueError): tw.markup("x", wronkw=3) with pytest.raises(ValueError):...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
127
markup
ref
function
text = tw.markup("hello", **{color: True, "bold": bold})
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
130
test_markup_bad
def
function
def test_markup_bad(self, tw) -> None: with pytest.raises(ValueError): tw.markup("x", wronkw=3) with pytest.raises(ValueError): tw.markup("x", wronkw=0) def test_line_write_markup(self, tw) -> None: tw.hasmarkup = _True tw.line("x", bold=_True) tw...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
131
raises
ref
function
with pytest.raises(ValueError):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
132
markup
ref
function
tw.markup("x", wronkw=3)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
133
raises
ref
function
with pytest.raises(ValueError):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
134
markup
ref
function
tw.markup("x", wronkw=0)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
136
test_line_write_markup
def
function
def test_line_write_markup(self, tw) -> None: tw.hasmarkup = _True tw.line("x", bold=_True) tw.write("x\n", red=_True) lines = tw.getlines() if sys.platform != "win32": assert len(lines[0]) >= 2, lines assert len(lines[1]) >= 2, lines def test_att...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
138
line
ref
function
tw.line("x", bold=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
140
getlines
ref
function
lines = tw.getlines()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
145
test_attr_fullwidth
def
function
def test_attr_fullwidth(self, tw) -> None: tw.sep("-", "hello", fullwidth=70) tw.fullwidth = 70 tw.sep("-", "hello") lines = tw.getlines() assert len(lines[0]) == len(lines[1])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
146
sep
ref
function
tw.sep("-", "hello", fullwidth=70)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
148
sep
ref
function
tw.sep("-", "hello")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
149
getlines
ref
function
lines = tw.getlines()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
153
skipif
ref
function
@pytest.mark.skipif(sys.platform == "win32", reason="win32 has no native ansi")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
154
test_attr_hasmarkup
def
function
def test_attr_hasmarkup() -> None: file = io.StringIO() tw = terminalwriter.TerminalWriter(file) assert not tw.hasmarkup tw.hasmarkup = _True tw.line("hello", bold=_True) s = file.getvalue() assert len(s) > len("hello\n") assert "\x1b[1m" in s assert "\x1b[0m" in s
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
155
StringIO
ref
function
file = io.StringIO()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
156
TerminalWriter
ref
function
tw = terminalwriter.TerminalWriter(file)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
159
line
ref
function
tw.line("hello", bold=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
160
getvalue
ref
function
s = file.getvalue()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
166
assert_color_set
def
function
def assert_color_set(): file = io.StringIO() tw = terminalwriter.TerminalWriter(file) assert tw.hasmarkup tw.line("hello", bold=_True) s = file.getvalue() assert len(s) > len("hello\n") assert "\x1b[1m" in s assert "\x1b[0m" in s
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
167
StringIO
ref
function
file = io.StringIO()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
168
TerminalWriter
ref
function
tw = terminalwriter.TerminalWriter(file)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
170
line
ref
function
tw.line("hello", bold=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
171
getvalue
ref
function
s = file.getvalue()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
177
assert_color_not_set
def
function
def assert_color_not_set(): f = io.StringIO() f.isatty = lambda: _True # type: ignore tw = terminalwriter.TerminalWriter(file=f) assert not tw.hasmarkup tw.line("hello", bold=_True) s = f.getvalue() assert s == "hello\n"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
178
StringIO
ref
function
f = io.StringIO()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
180
TerminalWriter
ref
function
tw = terminalwriter.TerminalWriter(file=f)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
182
line
ref
function
tw.line("hello", bold=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
183
getvalue
ref
function
s = f.getvalue()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
187
test_should_do_markup_PY_COLORS_eq_1
def
function
def test_should_do_markup_PY_COLORS_eq_1(monkeypatch: MonkeyPatch) -> None: monkeypatch.setitem(os.environ, "PY_COLORS", "1") assert_color_set()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
188
setitem
ref
function
monkeypatch.setitem(os.environ, "PY_COLORS", "1")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
189
assert_color_set
ref
function
assert_color_set()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
192
test_should_not_do_markup_PY_COLORS_eq_0
def
function
def test_should_not_do_markup_PY_COLORS_eq_0(monkeypatch: MonkeyPatch) -> None: monkeypatch.setitem(os.environ, "PY_COLORS", "0") assert_color_not_set()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
193
setitem
ref
function
monkeypatch.setitem(os.environ, "PY_COLORS", "0")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
194
assert_color_not_set
ref
function
assert_color_not_set()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
197
test_should_not_do_markup_NO_COLOR
def
function
def test_should_not_do_markup_NO_COLOR(monkeypatch: MonkeyPatch) -> None: monkeypatch.setitem(os.environ, "NO_COLOR", "1") assert_color_not_set()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
198
setitem
ref
function
monkeypatch.setitem(os.environ, "NO_COLOR", "1")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
199
assert_color_not_set
ref
function
assert_color_not_set()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
202
test_should_do_markup_FORCE_COLOR
def
function
def test_should_do_markup_FORCE_COLOR(monkeypatch: MonkeyPatch) -> None: monkeypatch.setitem(os.environ, "FORCE_COLOR", "1") assert_color_set()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
203
setitem
ref
function
monkeypatch.setitem(os.environ, "FORCE_COLOR", "1")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
204
assert_color_set
ref
function
assert_color_set()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
207
test_should_not_do_markup_NO_COLOR_and_FORCE_COLOR
def
function
def test_should_not_do_markup_NO_COLOR_and_FORCE_COLOR( monkeypatch: MonkeyPatch,
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
210
setitem
ref
function
monkeypatch.setitem(os.environ, "NO_COLOR", "1")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
211
setitem
ref
function
monkeypatch.setitem(os.environ, "FORCE_COLOR", "1")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
212
assert_color_not_set
ref
function
assert_color_not_set()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
215
TestTerminalWriterLineWidth
def
class
test_init test_update test_update_with_newline test_update_with_wide_text test_composed test_combining
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
216
test_init
def
function
def test_init(self) -> None: tw = terminalwriter.TerminalWriter() assert tw.width_of_current_line == 0 def test_update(self) -> None: tw = terminalwriter.TerminalWriter() tw.write("hello world") assert tw.width_of_current_line == 11 def test_update_with_newline(self...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
217
TerminalWriter
ref
function
tw = terminalwriter.TerminalWriter()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
220
test_update
def
function
def test_update(self) -> None: tw = terminalwriter.TerminalWriter() tw.write("hello world") assert tw.width_of_current_line == 11 def test_update_with_newline(self) -> None: tw = terminalwriter.TerminalWriter() tw.write("hello\nworld") assert tw.width_of_current_...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
221
TerminalWriter
ref
function
tw = terminalwriter.TerminalWriter()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
225
test_update_with_newline
def
function
def test_update_with_newline(self) -> None: tw = terminalwriter.TerminalWriter() tw.write("hello\nworld") assert tw.width_of_current_line == 5 def test_update_with_wide_text(self) -> None: tw = terminalwriter.TerminalWriter() tw.write("乇乂ㄒ尺卂 ㄒ卄丨匚匚") assert tw.wid...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
226
TerminalWriter
ref
function
tw = terminalwriter.TerminalWriter()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
230
test_update_with_wide_text
def
function
def test_update_with_wide_text(self) -> None: tw = terminalwriter.TerminalWriter() tw.write("乇乂ㄒ尺卂 ㄒ卄丨匚匚") assert tw.width_of_current_line == 21 # 5*2 + 1 + 5*2 def test_composed(self) -> None: tw = terminalwriter.TerminalWriter() text = "café food" assert len(t...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
231
TerminalWriter
ref
function
tw = terminalwriter.TerminalWriter()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
235
test_composed
def
function
def test_composed(self) -> None: tw = terminalwriter.TerminalWriter() text = "café food" assert len(text) == 9 tw.write(text) assert tw.width_of_current_line == 9 def test_combining(self) -> None: tw = terminalwriter.TerminalWriter() text = "café food" ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
236
TerminalWriter
ref
function
tw = terminalwriter.TerminalWriter()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
242
test_combining
def
function
def test_combining(self) -> None: tw = terminalwriter.TerminalWriter() text = "café food" assert len(text) == 10 tw.write(text) assert tw.width_of_current_line == 9
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
243
TerminalWriter
ref
function
tw = terminalwriter.TerminalWriter()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
250
parametrize
ref
function
@pytest.mark.parametrize(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
253
param
ref
function
pytest.param(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
259
param
ref
function
pytest.param(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
265
param
ref
function
pytest.param(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
271
param
ref
function
pytest.param(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
279
test_code_highlight
def
function
def test_code_highlight(has_markup, code_highlight, expected, color_mapping): f = io.StringIO() tw = terminalwriter.TerminalWriter(f) tw.hasmarkup = has_markup tw.code_highlight = code_highlight tw._write_source(["assert 0"]) assert f.getvalue().splitlines(keepends=_True) == color_mapping.forma...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
280
StringIO
ref
function
f = io.StringIO()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
281
TerminalWriter
ref
function
tw = terminalwriter.TerminalWriter(f)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
284
_write_source
ref
function
tw._write_source(["assert 0"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
286
getvalue
ref
function
assert f.getvalue().splitlines(keepends=True) == color_mapping.format([expected])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
288
raises
ref
function
with pytest.raises(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_terminalwriter.py
testing/io/test_terminalwriter.py
292
_write_source
ref
function
tw._write_source(["assert 0"], [" ", " "])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_wcwidth.py
testing/io/test_wcwidth.py
5
parametrize
ref
function
@pytest.mark.parametrize(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_wcwidth.py
testing/io/test_wcwidth.py
20
test_wcwidth
def
function
def test_wcwidth(c: str, expected: int) -> None: assert wcwidth(c) == expected
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_wcwidth.py
testing/io/test_wcwidth.py
21
wcwidth
ref
function
assert wcwidth(c) == expected
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_wcwidth.py
testing/io/test_wcwidth.py
24
parametrize
ref
function
@pytest.mark.parametrize(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_wcwidth.py
testing/io/test_wcwidth.py
36
test_wcswidth
def
function
def test_wcswidth(s: str, expected: int) -> None: assert wcswidth(s) == expected
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_wcwidth.py
testing/io/test_wcwidth.py
37
wcswidth
ref
function
assert wcswidth(s) == expected
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py
testing/logging/test_fixture.py
6
getLogger
ref
function
logger = logging.getLogger(__name__)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py
testing/logging/test_fixture.py
7
getLogger
ref
function
sublogger = logging.getLogger(__name__ + ".baz")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py
testing/logging/test_fixture.py
10
test_fixture_help
def
function
def test_fixture_help(pytester: Pytester) -> None: result = pytester.runpytest("--fixtures") result.stdout.fnmatch_lines(["*caplog*"])