mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -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):
|
def filter_tests(suite, test_ok):
|
||||||
ans = unittest.TestSuite()
|
ans = unittest.TestSuite()
|
||||||
|
added = set()
|
||||||
for test in itertests(suite):
|
for test in itertests(suite):
|
||||||
if test_ok(test):
|
if test_ok(test) and test not in added:
|
||||||
ans.addTest(test)
|
ans.addTest(test)
|
||||||
|
added.add(test)
|
||||||
return ans
|
return ans
|
||||||
|
|
||||||
def filter_tests_by_name(suite, *names):
|
def filter_tests_by_name(suite, *names):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user