From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id A36F11381F3 for ; Mon, 21 Oct 2013 02:20:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5FA31E0AD7; Mon, 21 Oct 2013 02:20:45 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F39BCE0AD7 for ; Mon, 21 Oct 2013 02:20:44 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 148F933EFCC for ; Mon, 21 Oct 2013 02:20:44 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id BC824E5308 for ; Mon, 21 Oct 2013 02:20:42 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1382321578.44accfe2cacdc72145be1849e937af813d7fc7d3.vapier@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/tests/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/tests/__init__.py X-VCS-Directories: pym/portage/tests/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 44accfe2cacdc72145be1849e937af813d7fc7d3 X-VCS-Branch: master Date: Mon, 21 Oct 2013 02:20:42 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: feed93e0-d813-42be-8bdc-38778991b822 X-Archives-Hash: 3f6d11bd86c7f7e7c402708692f43c53 commit: 44accfe2cacdc72145be1849e937af813d7fc7d3 Author: Mike Frysinger gentoo org> AuthorDate: Mon Oct 21 02:11:05 2013 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Mon Oct 21 02:12:58 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=44accfe2 tests: support assertIn/assertNotIn in python-2.6 --- pym/portage/tests/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pym/portage/tests/__init__.py b/pym/portage/tests/__init__.py index 6c5c4df..84e732a 100644 --- a/pym/portage/tests/__init__.py +++ b/pym/portage/tests/__init__.py @@ -279,9 +279,16 @@ if unittest_skip_shims: def skipTest(self, reason): raise SkipTest(reason) - setattr(TestCase, 'skipTest', skipTest) + def assertIn(self, member, container, msg=None): + self.assertTrue(member in container, msg=msg) + setattr(TestCase, 'assertIn', assertIn) + + def assertNotIn(self, member, container, msg=None): + self.assertFalse(member in container, msg=msg) + setattr(TestCase, 'assertNotIn', assertNotIn) + class TextTestRunner(unittest.TextTestRunner): """ We subclass unittest.TextTestRunner to output SKIP for tests that fail but are skippable