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 1QPTwH-0002vH-Mq for garchives@archives.gentoo.org; Thu, 26 May 2011 06:21:02 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D1F491C4E6; Thu, 26 May 2011 06:18:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id A24811C4F2 for ; Thu, 26 May 2011 06:18:30 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6C01D1B403E for ; Thu, 26 May 2011 06:18:30 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id D1F9080505 for ; Thu, 26 May 2011 06:18:29 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: Subject: [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/locks/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/tests/locks/test_asynchronous_lock.py X-VCS-Directories: pym/portage/tests/locks/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: fa3a425622a0b1ac42b8b98d0e15d655f3480e35 Date: Thu, 26 May 2011 06:18:29 +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: a9220f82b5821c633c66edcb5e10be37 commit: fa3a425622a0b1ac42b8b98d0e15d655f3480e35 Author: Zac Medico gentoo org> AuthorDate: Tue May 17 21:14:20 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu May 26 03:05:39 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dfa3a4256 test_asynchronous_lock: test returncode more --- pym/portage/tests/locks/test_asynchronous_lock.py | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pym/portage/tests/locks/test_asynchronous_lock.py b/pym/port= age/tests/locks/test_asynchronous_lock.py index dc4619d..d592f4b 100644 --- a/pym/portage/tests/locks/test_asynchronous_lock.py +++ b/pym/portage/tests/locks/test_asynchronous_lock.py @@ -23,17 +23,17 @@ class AsynchronousLockTestCase(TestCase): _force_thread=3DTrue, _force_dummy=3Dforce_dummy) async_lock.start() - async_lock.wait() - async_lock.unlock() + self.assertEqual(async_lock.wait(), os.EX_OK) self.assertEqual(async_lock.returncode, os.EX_OK) + async_lock.unlock() =20 async_lock =3D AsynchronousLock(path=3Dpath, scheduler=3Dscheduler, _force_async=3Dforce_async, _force_process=3DTrue) async_lock.start() - async_lock.wait() - async_lock.unlock() + self.assertEqual(async_lock.wait(), os.EX_OK) self.assertEqual(async_lock.returncode, os.EX_OK) + async_lock.unlock() =20 finally: shutil.rmtree(tempdir) @@ -46,6 +46,7 @@ class AsynchronousLockTestCase(TestCase): lock1 =3D AsynchronousLock(path=3Dpath, scheduler=3Dscheduler) lock1.start() self.assertEqual(lock1.wait(), os.EX_OK) + self.assertEqual(lock1.returncode, os.EX_OK) =20 # lock2 requires _force_async=3DTrue since the portage.locks # module is not designed to work as intended here if the @@ -59,6 +60,7 @@ class AsynchronousLockTestCase(TestCase): =20 lock1.unlock() self.assertEqual(lock2.wait(), os.EX_OK) + self.assertEqual(lock2.returncode, os.EX_OK) lock2.unlock() finally: shutil.rmtree(tempdir) @@ -71,6 +73,7 @@ class AsynchronousLockTestCase(TestCase): lock1 =3D AsynchronousLock(path=3Dpath, scheduler=3Dscheduler) lock1.start() self.assertEqual(lock1.wait(), os.EX_OK) + self.assertEqual(lock1.returncode, os.EX_OK) lock2 =3D AsynchronousLock(path=3Dpath, scheduler=3Dscheduler, _force_async=3DTrue, _force_process=3DTrue) lock2.start() @@ -81,6 +84,7 @@ class AsynchronousLockTestCase(TestCase): lock2.cancel() self.assertEqual(lock2.wait() =3D=3D os.EX_OK, False) self.assertEqual(lock2.returncode =3D=3D os.EX_OK, False) + self.assertEqual(lock2.returncode is None, False) lock1.unlock() finally: shutil.rmtree(tempdir)