Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/pms-test-suite:master commit in: pmstestsuite/library/
Date: Wed, 29 Jun 2011 17:52:41
Message-Id: 34e2d2cb95110c1155a96f385db7d95b93d942e5.mgorny@gentoo
1 commit: 34e2d2cb95110c1155a96f385db7d95b93d942e5
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 29 17:05:40 2011 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 29 17:05:40 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=34e2d2cb
7
8 Set defaults for supported_ and relevant_eapis.
9
10 ---
11 pmstestsuite/library/case.py | 10 ++++++----
12 1 files changed, 6 insertions(+), 4 deletions(-)
13
14 diff --git a/pmstestsuite/library/case.py b/pmstestsuite/library/case.py
15 index 0843677..e87f15d 100644
16 --- a/pmstestsuite/library/case.py
17 +++ b/pmstestsuite/library/case.py
18 @@ -2,7 +2,7 @@
19 # (c) 2011 Michał Górny <mgorny@g.o>
20 # Released under the terms of the 2-clause BSD license.
21
22 -import copy, re
23 +import copy, random, re
24
25 from abc import ABCMeta, abstractmethod, abstractproperty
26
27 @@ -118,12 +118,12 @@ class EbuildTestCase(TestCase):
28 def supported_eapis(self):
29 """
30 A list of EAPIs for which the test is able to run and gives
31 - predictible results.
32 + predictible results. Defaults to all available EAPIs.
33
34 For example, if a feature is required in EAPI 3+ and optional
35 in earlier EAPIs, this variable should contain (3,4).
36 """
37 - pass
38 + return (0, 1, 2, 3, 4)
39
40 @property
41 def relevant_eapis(self):
42 @@ -131,8 +131,10 @@ class EbuildTestCase(TestCase):
43 A list of EAPIs for which the test should be run by default (in
44 non-thorough mode). This should list all the EAPIs where
45 a change of behaviour occurs.
46 +
47 + When unset, defaults to a random element of .supported_eapis().
48 """
49 - pass
50 + return random.choice(self.supported_eapis)
51
52 @classmethod
53 def inst_all(cls, *args, **kwargs):