From 8600253254e46a0cd9290ec695da911421326fe0 Mon Sep 17 00:00:00 2001 From: jab Date: Mon, 3 Jun 2019 00:47:09 +0000 Subject: [PATCH] Fix `UnboundLocalError: local variable 'ref' referenced before assignment` on Travis --- tests/hypothesis/test_properties.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/hypothesis/test_properties.py b/tests/hypothesis/test_properties.py index 672e692..20d0fc1 100644 --- a/tests/hypothesis/test_properties.py +++ b/tests/hypothesis/test_properties.py @@ -314,9 +314,9 @@ def test_refcycle_orderedbidict_nodes(ob_cls, init_items): map(ref, some_ordered_bidict._fwdm.values()), # pylint: disable=protected-access [] ) - assert all(ref() is not None for ref in node_weakrefs) + assert all(r() is not None for r in node_weakrefs) del some_ordered_bidict - assert all(ref() is None for ref in node_weakrefs) + assert all(r() is None for r in node_weakrefs) finally: gc.enable()