Skip to content

Commit 508444d

Browse files
committed
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.
1 parent b272af8 commit 508444d

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tests/interrogate/test_property.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def test_seq_property_getitem():
149149
prop[i]
150150

151151
# Make sure it preserves refcount of invalid indices
152-
i = "nonsense"
152+
i = "nonsense195641"
153153
with constant_refcount(i):
154154
try:
155155
prop[i]
@@ -250,7 +250,7 @@ def test_seq_property_index():
250250
except ValueError:
251251
pass
252252

253-
nonsense = "nonsense"
253+
nonsense = "nonsense854371"
254254
with constant_refcount(nonsense):
255255
try:
256256
prop.index(nonsense)
@@ -271,7 +271,7 @@ def test_seq_property_count():
271271
with constant_refcount(item_b):
272272
prop.count(item_b)
273273

274-
nonsense = "nonsense"
274+
nonsense = "nonsense219449"
275275
with constant_refcount(nonsense):
276276
prop.count(nonsense)
277277

@@ -447,8 +447,8 @@ def test_map_property_empty():
447447

448448

449449
def test_map_property_getitem():
450-
key = 'key'
451-
value = 'value'
450+
key = 'key162732'
451+
value = 'value162732'
452452
prop = map_property(**{key: value})
453453

454454
with constant_refcount(key):
@@ -462,8 +462,8 @@ def test_map_property_getitem():
462462

463463

464464
def test_map_property_setitem():
465-
key = 'key'
466-
value = 'value'
465+
key = 'key559075'
466+
value = 'value559075'
467467
prop = map_property()
468468

469469
# Setting new key
@@ -490,8 +490,8 @@ def test_map_property_setitem():
490490

491491

492492
def test_map_property_delitem():
493-
key = 'key'
494-
value = 'value'
493+
key = 'key731691'
494+
value = 'value731691'
495495
prop = map_property(**{key: value})
496496

497497
with constant_refcount(key):
@@ -519,11 +519,11 @@ def test_map_property_contains():
519519

520520

521521
def test_map_property_get():
522-
key = 'key'
523-
value = 'value'
522+
key = 'key861801'
523+
value = 'value861801'
524524
prop = map_property(**{key: value})
525525

526-
default = 'default'
526+
default = 'default861801'
527527
with constant_refcount(key):
528528
with constant_refcount(default):
529529
assert prop.get(key) == value

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy