[issue9554] test_argparse.py: use new unittest features

2014-07-05 Thread Berker Peksag

Berker Peksag added the comment:

Thanks Denver and Radu. And thanks for the review, Ezio.

--
assignee:  -> berker.peksag
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9554] test_argparse.py: use new unittest features

2014-07-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f240ca6345c8 by Berker Peksag in branch 'default':
Issue #9554: Use modern unittest features in test_argparse.
http://hg.python.org/cpython/rev/f240ca6345c8

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9554] test_argparse.py: use new unittest features

2014-07-05 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9554] test_argparse.py: use new unittest features

2014-07-05 Thread Berker Peksag

Changes by Berker Peksag :


Added file: http://bugs.python.org/file35869/issue9554_v4.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9554] test_argparse.py: use new unittest features

2014-07-04 Thread Berker Peksag

Berker Peksag added the comment:

Updated patch.

--
type: behavior -> enhancement
Added file: http://bugs.python.org/file35852/issue9554_v3.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9554] test_argparse.py: use new unittest features

2014-06-30 Thread Berker Peksag

Berker Peksag added the comment:

Updated patch to use assertRaisesRegex in test_invalid_action, 
test_multiple_dest

--
Added file: http://bugs.python.org/file35809/issue9554_v2.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9554] test_argparse.py: use new unittest features

2014-06-29 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag
versions: +Python 3.5 -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9554] test_argparse.py: use new unittest features

2014-06-29 Thread Mark Lawrence

Mark Lawrence added the comment:

Latest patch LGTM so can we have a commit review please.

--
nosy: +BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9554] test_argparse.py: use new unittest features

2013-01-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also issue16510.

--
nosy: +serhiy.storchaka
versions: +Python 3.4 -Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9554] test_argparse.py: use new unittest features

2012-05-21 Thread Radu Voicilas

Radu Voicilas  added the comment:

Hi Eric, Denver's patch should apply correctly from the root. Also, I've made 
the changes you mention:

try: except: assert

has been replaced by:

with self.assertRaises()

--
Added file: http://bugs.python.org/file25659/test_argparse.py.take2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9554] test_argparse.py: use new unittest features

2012-05-20 Thread Éric Araujo

Éric Araujo  added the comment:

Another one:

 except ArgumentParserError:
 err = sys.exc_info()[1]

This reeks of single-codebase-for-2.x-and-3.x and could probably be replaced by 
assertRaises or at least a regular except...as.

--
nosy: +eric.araujo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9554] test_argparse.py: use new unittest features

2012-05-20 Thread Radu Voicilas

Radu Voicilas  added the comment:

The patch is still valid - it applies ok. The only issues as mentioned by 
sandro.tosi are offsets and that it was generated inside Lib/

It would be worth having these changes applied.

--
nosy: +raduv

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9554] test_argparse.py: use new unittest features

2011-01-04 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9554] test_argparse.py: use new unittest features

2011-01-04 Thread Sandro Tosi

Sandro Tosi  added the comment:

Hi, I've applied the patch and it goes fine (except for some offsets and the 
fact it was generated inside Lib/test) and the tests are still all ok. I'd 
suggest to apply it.

--
nosy: +sandro.tosi
stage:  -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9554] test_argparse.py: use new unittest features

2010-08-10 Thread Steven Bethard

Steven Bethard  added the comment:

These all look like good changes to me. (I looked at the patch, but haven't 
tried applying it though.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9554] test_argparse.py: use new unittest features

2010-08-09 Thread Denver Coneybeare

Changes by Denver Coneybeare :


Added file: http://bugs.python.org/file18464/test_argparse.py.unittest2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9554] test_argparse.py: use new unittest features

2010-08-09 Thread Denver Coneybeare

Changes by Denver Coneybeare :


Removed file: http://bugs.python.org/file18463/test_argparse.py.unittest2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9554] test_argparse.py: use new unittest features

2010-08-09 Thread Denver Coneybeare

New submission from Denver Coneybeare :

Some of the unit testing code in test_argparse.py could be modified to take 
advantage of the new unittest features in Python 2.7 and 3.x.  My suggested 
changes are attached in the patch file test_argparse.py.unittest2.patch

One big one is that assertEquals() now prints a "diff" when multi-line strings 
compare unequal, so the manual "diffing" logic from the unit tests can be 
removed.  Also, assertIsNone() is slightly better than assertEquals(None, x).  
Finally, there is a tiny fix where parse_args() was expected to throw 
ArgumentParserError but the test would not fail if it threw no exceptions.

--
components: Tests
files: test_argparse.py.unittest2.patch
keywords: patch
messages: 113505
nosy: benjamin.peterson, bethard, denversc, eric.smith
priority: normal
severity: normal
status: open
title: test_argparse.py: use new unittest features
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file18463/test_argparse.py.unittest2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com