# fixhunt regression fixture: ruff UP005, ruff 0.17.1 # the fix labelled safe changes the program's output on this program # before the fix: no stdout, stderr "AttributeError: 'Test' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?", exit 1 # after the fix: no stdout, stderr "UnboundLocalError: cannot access local variable 'x' where it is not associated with a value", exit 1 # finding 2026-10-17T21-11-13-477Z-9jdd-ruff-UP005/r1-p001; rule fired 1 time(s) before the fix import unittest class Test(unittest.TestCase): def test(self): data = [1, 2, 3] results = [(x := i) for i in data if self.assertEquals(x, i)] Test().test()