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 D8CC51381F3 for ; Sat, 3 Aug 2013 01:37:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A9747E0A43; Sat, 3 Aug 2013 01:37:33 +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 2FA65E0A43 for ; Sat, 3 Aug 2013 01:37:33 +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 29DE333EBBD for ; Sat, 3 Aug 2013 01:37:32 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id AAF95E468F for ; Sat, 3 Aug 2013 01:37:30 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1375493834.4b2ff81f880a73cff6a4b9ec67cebeed79bd3382.zmedico@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: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 4b2ff81f880a73cff6a4b9ec67cebeed79bd3382 X-VCS-Branch: master Date: Sat, 3 Aug 2013 01:37:30 +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: 23a98a5a-c1d4-4bd2-a23e-be94e334d5cc X-Archives-Hash: 8f0d41d86800fdd0a8076e53735673e8 commit: 4b2ff81f880a73cff6a4b9ec67cebeed79bd3382 Author: Zac Medico gentoo org> AuthorDate: Sat Aug 3 01:37:14 2013 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Aug 3 01:37:14 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=4b2ff81f runTests: portage.util._argparse --- pym/portage/tests/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pym/portage/tests/__init__.py b/pym/portage/tests/__init__.py index d90fe6f..c0ad112 100644 --- a/pym/portage/tests/__init__.py +++ b/pym/portage/tests/__init__.py @@ -7,7 +7,6 @@ from __future__ import print_function import sys import time import unittest -from optparse import OptionParser, OptionValueError try: from unittest.runner import _TextTestResult # new in python-2.7 @@ -18,16 +17,17 @@ import portage from portage import os from portage import _encodings from portage import _unicode_decode +from portage.util._argparse import ArgumentParser def main(): suite = unittest.TestSuite() basedir = os.path.dirname(os.path.realpath(__file__)) usage = "usage: %s [options] [tests to run]" % os.path.basename(sys.argv[0]) - parser = OptionParser(usage=usage) - parser.add_option("-l", "--list", help="list all tests", + parser = ArgumentParser(usage=usage) + parser.add_argument("-l", "--list", help="list all tests", action="store_true", dest="list_tests") - (options, args) = parser.parse_args(args=sys.argv) + options, args = parser.parse_known_args(args=sys.argv) if (os.environ.get('NOCOLOR') in ('yes', 'true') or os.environ.get('TERM') == 'dumb' or