From 6d2b60ff3e6f905b81c6d2fc6595b39250e3a586 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Mon, 16 Nov 2020 20:36:54 +0300 Subject: Tests: making available versions unique. --- test/conftest.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/conftest.py b/test/conftest.py index 41d1bf00..9aaf7640 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -142,10 +142,9 @@ def pytest_sessionstart(session): # discover available modules from unit.log for module in re.findall(r'module: ([a-zA-Z]+) (.*) ".*"$', log, re.M): - if module[0] not in option.available['modules']: - option.available['modules'][module[0]] = [module[1]] - else: - option.available['modules'][module[0]].append(module[1]) + versions = option.available['modules'].setdefault(module[0], []) + if module[1] not in versions: + versions.append(module[1]) # discover modules from check -- cgit