Skip to content

Commit 1c465bd

Browse files
committed
Add a change note on issue #7310
1 parent 049f5b5 commit 1c465bd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

changelog/7310.bugfix.rst

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Fix ``UnboundLocalError: local variable 'letter' referenced before
2+
assignment`` in ``_pytest.terminal.pytest_report_teststatus()``
3+
when plugins return report objects in an unconventional state.
4+
5+
This was making ``pytest_report_teststatus()`` skip
6+
entering if-block branches that declare the ``letter`` variable.
7+
8+
The fix was to set the initial value of the ``letter`` before
9+
the if-block cascade so that it always has a value.

0 commit comments

Comments
 (0)