diff options
author | Max Romanov <max.romanov@nginx.com> | 2020-11-16 20:36:54 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2020-11-16 20:36:54 +0300 |
commit | 6d2b60ff3e6f905b81c6d2fc6595b39250e3a586 (patch) | |
tree | 1dd5d779cd8ffa89905d0075eaebc1021c8f0054 /test | |
parent | 3837d28f9b7c5d0840d2e4b26f4867b66838d31b (diff) | |
download | unit-6d2b60ff3e6f905b81c6d2fc6595b39250e3a586.tar.gz unit-6d2b60ff3e6f905b81c6d2fc6595b39250e3a586.tar.bz2 |
Tests: making available versions unique.
Diffstat (limited to 'test')
-rw-r--r-- | test/conftest.py | 7 |
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 |