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:56
Message-Id: a90c5dcab9a1b5ae0c9b4a4246c307709754b9c6.mgorny@gentoo
1 commit: a90c5dcab9a1b5ae0c9b4a4246c307709754b9c6
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 29 17:39:00 2011 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 29 17:39:00 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=a90c5dca
7
8 Support passing kwargs to the library constructor.
9
10 ---
11 pmstestsuite/library/__init__.py | 6 +++---
12 1 files changed, 3 insertions(+), 3 deletions(-)
13
14 diff --git a/pmstestsuite/library/__init__.py b/pmstestsuite/library/__init__.py
15 index 00891f6..a638b62 100644
16 --- a/pmstestsuite/library/__init__.py
17 +++ b/pmstestsuite/library/__init__.py
18 @@ -84,10 +84,10 @@ class TestLibrary(object):
19 """ Return common files necessary for the library (e.g. eclasses). """
20 return {}
21
22 -def load_library(name):
23 +def load_library(name, **kwargs):
24 """
25 Try to load a test library <name>. Instiantiate the first TestLibrary
26 - subclass found there.
27 + subclass found there. Pass kwargs to the __init__() function.
28
29 Returns a new TestLibrary subclass instance or raises one of the following
30 exceptions:
31 @@ -113,4 +113,4 @@ def load_library(name):
32 raise TypeError('Unable to find a TestLibrary subclass in %s'
33 % modname)
34
35 - return cls(modname)
36 + return cls(modname, **kwargs)