Whole file

nschloe/pytest-codeblocks

The author described this change as fix for expected code block. It counts as a record because the check below fails on the code as it stood at cf2f96802 and passes on 17b5f3bc3, with nothing else changed between the two runs.

Fix saved2021-05-10
Sharing licenceMIT · LICENSE.txt
Change size+1 1

What the code was meant to do, written into the code itself as a save note

fix for expected code block

The change

8787 "Found <!--pytest-codeblocks-expected-output--> "
8888 + "but block already has expected_output."
8989 )
90- expected_output = "\n".join(code_block)
90+ expected_output = "".join(code_block)
9191 out[-1] = CodeBlock(
9292 out[-1].code, out[-1].lineno, out[-1].syntax, expected_output
9393 )

The check that tells the two apart

failpass·tests/test_expected_output.py::test_cont

Check file tests/test_expected_output.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before itcf2f9680276dc3b2a4e7a32ffa07f522772aacab
Broken version dated2021-05-08
Modulepytest_codeblocks.main
Units changedextract_from_buffer
Fingerprint7f46ef8278677961
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in nschloe/pytest-codeblocks