UnboundLocalError: cannot access local variable 'x' where it is not associated with a value #11028
Labels
topic: rewrite
related to the assertion rewrite mechanism
type: bug
problem that needs to be addressed
There seems to be a regression in pytest version
7.3.x
when a walrus operator is used in an assert line.Code:
Fails the test with error:
in pytest version
7.3.x
, whereas with pytest version7.2.x
it passes successfully. My Python version is3.11
.Looks like it has to do with PR #10758.
The text was updated successfully, but these errors were encountered: