diff options
-rw-r--r-- | pmstestsuite/library/__init__.py | 2 | ||||
-rw-r--r-- | pmstestsuite/library/case.py | 14 |
2 files changed, 10 insertions, 6 deletions
diff --git a/pmstestsuite/library/__init__.py b/pmstestsuite/library/__init__.py index 6499e3f..d65958f 100644 --- a/pmstestsuite/library/__init__.py +++ b/pmstestsuite/library/__init__.py @@ -48,7 +48,7 @@ class TestLibrary(object): modname = '%s.%s' % (self.modname, modname) mod = __import__(modname, {}, {}, [clsname], 0) cls = getattr(mod, clsname) - for i in cls.inst_all(): + for i in cls.inst_all(thorough = self.thorough): self.tests.append(i) yield i diff --git a/pmstestsuite/library/case.py b/pmstestsuite/library/case.py index 3eba089..3327c33 100644 --- a/pmstestsuite/library/case.py +++ b/pmstestsuite/library/case.py @@ -149,16 +149,20 @@ class EbuildTestCase(TestCase): return (random.choice(cls._eval_prop(cls.supported_eapis)),) @classmethod - def inst_all(cls): + def inst_all(cls, thorough = False): """ - Instantiate the test case for all relevant EAPIs. + Instantiate the test case for all relevant EAPIs. If in thorough + mode, assume all supported EAPIs are relevant. Returns an iterator over a list of test case instances. """ - # sadly, no @classproperty - # but property object attributes are official - for eapi in cls._eval_prop(cls.relevant_eapis): + if thorough: + eapis = cls.supported_eapis + else: + eapis = cls.relevant_eapis + + for eapi in cls._eval_prop(eapis): yield cls(eapi = eapi) @property |