aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2011-06-29 19:46:51 +0200
committerMichał Górny <mgorny@gentoo.org>2011-06-29 19:46:51 +0200
commitf35a14a1d1f8cc7e2b79fdb3ae3054f038e9d407 (patch)
treef52884106136b668b54810d932bfe271798c9380 /pmstestsuite/library/case.py
parentEbuildTestCase: drop unused args to inst_all(). (diff)
downloadpms-test-suite-f35a14a1d1f8cc7e2b79fdb3ae3054f038e9d407.tar.gz
pms-test-suite-f35a14a1d1f8cc7e2b79fdb3ae3054f038e9d407.tar.bz2
pms-test-suite-f35a14a1d1f8cc7e2b79fdb3ae3054f038e9d407.zip
Actually support the thorough mode.
Diffstat (limited to 'pmstestsuite/library/case.py')
-rw-r--r--pmstestsuite/library/case.py14
1 files changed, 9 insertions, 5 deletions
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