Commit 56bd1d04 authored by Tres Seaver's avatar Tres Seaver

Fix boneheaded regression test.

Using 'random' in a test exercising a known bug is a code stench.
parent a60b591d
...@@ -313,9 +313,11 @@ class BugFixes(unittest.TestCase): ...@@ -313,9 +313,11 @@ class BugFixes(unittest.TestCase):
t[id] = (id, ToBeDeleted(id), _u('somename')) t[id] = (id, ToBeDeleted(id), _u('somename'))
else: else:
#del #del
id = trandom.choice(list(ids.keys())) keys = list(ids.keys())
del t[id] if keys:
del ids[id] id = trandom.choice(keys)
del t[id]
del ids[id]
ids = ids.keys() ids = ids.keys()
trandom.shuffle(list(ids)) trandom.shuffle(list(ids))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment