mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Ensure test matching does not return dupes
This commit is contained in:
parent
74134dd429
commit
cedde63fe8
@ -82,9 +82,11 @@ def init_env():
|
||||
|
||||
def filter_tests(suite, test_ok):
|
||||
ans = unittest.TestSuite()
|
||||
added = set()
|
||||
for test in itertests(suite):
|
||||
if test_ok(test):
|
||||
if test_ok(test) and test not in added:
|
||||
ans.addTest(test)
|
||||
added.add(test)
|
||||
return ans
|
||||
|
||||
def filter_tests_by_name(suite, *names):
|
||||
|
Loading…
x
Reference in New Issue
Block a user