MCPcopy
hub / github.com/psf/black / test_expression_ff

Method test_expression_ff

tests/test_black.py:281–292  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

279 self.assertIn(black.TargetVersion.PY315, versions)
280
281 def test_expression_ff(self) -> None:
282 source, expected = read_data("cases", "expression.py")
283 tmp_file = Path(black.dump_to_file(source))
284 try:
285 self.assertTrue(ff(tmp_file, write_back=black.WriteBack.YES))
286 actual = tmp_file.read_text(encoding="utf-8")
287 finally:
288 os.unlink(tmp_file)
289 self.assertFormatEqual(expected, actual)
290 with patch("black.dump_to_file", dump_to_stderr):
291 black.assert_equivalent(source, actual)
292 black.assert_stable(source, actual, DEFAULT_MODE)
293
294 def test_expression_diff(self) -> None:
295 source, _ = read_data("cases", "expression.py")

Callers

nothing calls this directly

Calls 2

read_dataFunction · 0.90
assertFormatEqualMethod · 0.80

Tested by

no test coverage detected