summaryrefslogtreecommitdiffhomepage
path: root/test/conftest.py
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2020-11-16 20:36:54 +0300
committerMax Romanov <max.romanov@nginx.com>2020-11-16 20:36:54 +0300
commit6d2b60ff3e6f905b81c6d2fc6595b39250e3a586 (patch)
tree1dd5d779cd8ffa89905d0075eaebc1021c8f0054 /test/conftest.py
parent3837d28f9b7c5d0840d2e4b26f4867b66838d31b (diff)
downloadunit-6d2b60ff3e6f905b81c6d2fc6595b39250e3a586.tar.gz
unit-6d2b60ff3e6f905b81c6d2fc6595b39250e3a586.tar.bz2
Tests: making available versions unique.
Diffstat (limited to '')
-rw-r--r--test/conftest.py7
1 files 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