From 508444d27f71fa90b9ce34646354e673133d2680 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 22 Jan 2020 12:01:27 +0100 Subject: [PATCH] tests: use unique, non-interned keys for property refcount tests There is an intermittent build failure and I suspect it's because the keys are too generic and are interned, and thus may have their refcount incremented or decremented by some other (background?) process. --- tests/interrogate/test_property.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/interrogate/test_property.py b/tests/interrogate/test_property.py index 4d521d03e58..fffcb78ac04 100755 --- a/tests/interrogate/test_property.py +++ b/tests/interrogate/test_property.py @@ -149,7 +149,7 @@ def test_seq_property_getitem(): prop[i] # Make sure it preserves refcount of invalid indices - i = "nonsense" + i = "nonsense195641" with constant_refcount(i): try: prop[i] @@ -250,7 +250,7 @@ def test_seq_property_index(): except ValueError: pass - nonsense = "nonsense" + nonsense = "nonsense854371" with constant_refcount(nonsense): try: prop.index(nonsense) @@ -271,7 +271,7 @@ def test_seq_property_count(): with constant_refcount(item_b): prop.count(item_b) - nonsense = "nonsense" + nonsense = "nonsense219449" with constant_refcount(nonsense): prop.count(nonsense) @@ -447,8 +447,8 @@ def test_map_property_empty(): def test_map_property_getitem(): - key = 'key' - value = 'value' + key = 'key162732' + value = 'value162732' prop = map_property(**{key: value}) with constant_refcount(key): @@ -462,8 +462,8 @@ def test_map_property_getitem(): def test_map_property_setitem(): - key = 'key' - value = 'value' + key = 'key559075' + value = 'value559075' prop = map_property() # Setting new key @@ -490,8 +490,8 @@ def test_map_property_setitem(): def test_map_property_delitem(): - key = 'key' - value = 'value' + key = 'key731691' + value = 'value731691' prop = map_property(**{key: value}) with constant_refcount(key): @@ -519,11 +519,11 @@ def test_map_property_contains(): def test_map_property_get(): - key = 'key' - value = 'value' + key = 'key861801' + value = 'value861801' prop = map_property(**{key: value}) - default = 'default' + default = 'default861801' with constant_refcount(key): with constant_refcount(default): assert prop.get(key) == value