MCPcopy
hub / github.com/PyCQA/flake8 / test_tstring_logical_line

Function test_tstring_logical_line

tests/integration/test_plugins.py:302–331  ·  view source on GitHub ↗
(tmpdir, capsys)

Source from the content-addressed store, hash-verified

300
301@pytest.mark.xfail(sys.version_info < (3, 14), reason="3.14+")
302def test_tstring_logical_line(tmpdir, capsys): # pragma: >=3.14 cover
303 cfg_s = f"""\
304[flake8]
305extend-ignore = F
306[flake8:local-plugins]
307extension =
308 T = {yields_logical_line.__module__}:{yields_logical_line.__name__}
309"""
310
311 cfg = tmpdir.join("tox.ini")
312 cfg.write(cfg_s)
313
314 src = """\
315t''&#x27;
316hello {world}
317''&#x27;
318t'{{"{hello}": "{world}"}}'
319"""
320 t_py = tmpdir.join("t.py")
321 t_py.write_binary(src.encode())
322
323 with tmpdir.as_cwd():
324 assert main(("t.py", "--config", str(cfg))) == 1
325
326 expected = """\
327t.py:1:1: T001 "t'''xxxxxxx{world}x'''"
328t.py:4:1: T001 "t'xxx{hello}xxxx{world}xxx'"
329"""
330 out, err = capsys.readouterr()
331 assert out == expected

Callers

nothing calls this directly

Calls 2

mainFunction · 0.90
writeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…