MCPcopy Index your code
hub / github.com/lincolnloop/python-qrcode / test_change

Function test_change

qrcode/tests/test_release.py:33–43  ·  view source on GitHub ↗
(mock_file)

Source from the content-addressed store, hash-verified

31
32@mock.patch(OPEN, new_callable=mock.mock_open, read_data=DATA)
33def test_change(mock_file):
34 update_manpage({"name": "qrcode", "new_version": "3.11"})
35 expected = re.split(r"([^\n]*(?:\n|$))", DATA)[1::2]
36 expected[1] = (
37 expected[1]
38 .replace("version", "3.11")
39 .replace("date", datetime.datetime.now().strftime("%-d %b %Y"))
40 )
41 mock_file().write.assert_has_calls(
42 [mock.call(line) for line in expected if line != ""], any_order=True
43 )

Callers

nothing calls this directly

Calls 1

update_manpageFunction · 0.90

Tested by

no test coverage detected