From 6a9a4fe0d46263d4d158803d4a82851e240e0e63 Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Fri, 24 Apr 2020 05:08:56 +0100 Subject: Tests: introduced module version specification in prerequisites. --- test/unit/main.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'test/unit') diff --git a/test/unit/main.py b/test/unit/main.py index 4507f71a..074d053e 100644 --- a/test/unit/main.py +++ b/test/unit/main.py @@ -52,9 +52,21 @@ class TestUnit(unittest.TestCase): type = self.application_type for module in self.prerequisites['modules']: if module in self.available['modules']: - for version in self.available['modules'][module]: - self.application_type = type + ' ' + version + prereq_version = self.prerequisites['modules'][module] + available_versions = self.available['modules'][module] + + if prereq_version == 'all': + for version in available_versions: + self.application_type = type + ' ' + version + super().run(result) + elif prereq_version == 'any': + self.application_type = type + ' ' + available_versions[0] super().run(result) + else: + for version in available_versions: + if version.startswith(prereq_version): + self.application_type = type + ' ' + version + super().run(result) @classmethod def main(cls): -- cgit