From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QbywZ-0005us-OT for garchives@archives.gentoo.org; Wed, 29 Jun 2011 17:52:56 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EA4BC1C0B0; Wed, 29 Jun 2011 17:52:23 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id B991D1C0B0 for ; Wed, 29 Jun 2011 17:52:23 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 42B7C2AC01E for ; Wed, 29 Jun 2011 17:52:23 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 58BAF8004F for ; Wed, 29 Jun 2011 17:52:22 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: Subject: [gentoo-commits] proj/pms-test-suite:master commit in: pmstestsuite/library/ X-VCS-Repository: proj/pms-test-suite X-VCS-Files: pmstestsuite/library/__init__.py X-VCS-Directories: pmstestsuite/library/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: a90c5dcab9a1b5ae0c9b4a4246c307709754b9c6 Date: Wed, 29 Jun 2011 17:52:22 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 479e8ac610d17bf97689de433650fd1b commit: a90c5dcab9a1b5ae0c9b4a4246c307709754b9c6 Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Wed Jun 29 17:39:00 2011 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Wed Jun 29 17:39:00 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/pms-test-suit= e.git;a=3Dcommit;h=3Da90c5dca Support passing kwargs to the library constructor. --- pmstestsuite/library/__init__.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pmstestsuite/library/__init__.py b/pmstestsuite/library/__in= it__.py index 00891f6..a638b62 100644 --- a/pmstestsuite/library/__init__.py +++ b/pmstestsuite/library/__init__.py @@ -84,10 +84,10 @@ class TestLibrary(object): """ Return common files necessary for the library (e.g. eclasses). """ return {} =20 -def load_library(name): +def load_library(name, **kwargs): """ Try to load a test library . Instiantiate the first TestLibrary - subclass found there. + subclass found there. Pass kwargs to the __init__() function. =20 Returns a new TestLibrary subclass instance or raises one of the follow= ing exceptions: @@ -113,4 +113,4 @@ def load_library(name): raise TypeError('Unable to find a TestLibrary subclass in %s' % modname) =20 - return cls(modname) + return cls(modname, **kwargs)