314
305
def sorted_tests(suite_or_case, unpack_outer=False):
315
306
"""Sort suite_or_case while preserving non-vanilla TestSuites."""
316
307
# Duplicate test id can induce TypeError in Python 3.3.
317
308
# Detect the duplicate test ids, raise exception when found.
320
311
(test_id, count) for test_id, count in seen.items() if count > 1)