From 6e5f8a80a16c6e040330ec662e937184c2aec328 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 15 Dec 2014 18:03:53 +0100 Subject: use tox for testing, bump version to 1.3.0, declare support for py 3.3+3.4 also make sure we really test THIS lib, not the builtin one in stdlib. --- README.txt | 4 ++-- argparse.py | 7 ++++++- setup.py | 2 ++ test/test_argparse.py | 2 ++ tox.ini | 10 ++++++++++ 5 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 tox.ini diff --git a/README.txt b/README.txt index a16fb10..55b04db 100644 --- a/README.txt +++ b/README.txt @@ -20,8 +20,8 @@ Compatibility argparse should work on Python >= 2.3, it was tested on: -* 2.3.5, 2.4.4, 2.5.5, 2.6.5 and 2.7 -* 3.1, 3.2 +* 2.3, 2.4, 2.5, 2.6 and 2.7 +* 3.1, 3.2, 3.3, 3.4 Installation diff --git a/argparse.py b/argparse.py index 3d04620..681d19d 100644 --- a/argparse.py +++ b/argparse.py @@ -61,7 +61,12 @@ considered public as object names -- the API of the formatter objects is still considered an implementation detail.) """ -__version__ = '1.2.2' +__version__ = '1.3.0' # we use our own version number independant of the + # one in stdlib and we release this on pypi. + +__external_lib__ = True # to make sure the tests really test THIS lib, + # not the builtin one in Python stdlib + __all__ = [ 'ArgumentParser', 'ArgumentError', diff --git a/setup.py b/setup.py index 377c285..1122861 100644 --- a/setup.py +++ b/setup.py @@ -35,6 +35,8 @@ Programming Language :: Python :: 2.7 Programming Language :: Python :: 3.0 Programming Language :: Python :: 3.1 Programming Language :: Python :: 3.2 +Programming Language :: Python :: 3.3 +Programming Language :: Python :: 3.4 Topic :: Software Development""".splitlines(), py_modules=['argparse'], ) diff --git a/test/test_argparse.py b/test/test_argparse.py index bfa5f9e..89284ad 100644 --- a/test/test_argparse.py +++ b/test/test_argparse.py @@ -10,6 +10,8 @@ import tempfile import unittest import argparse +assert getattr(argparse, '__external_lib__', False) # fail early if we test the wrong lib + try: from StringIO import StringIO except ImportError: diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..c9747d5 --- /dev/null +++ b/tox.ini @@ -0,0 +1,10 @@ +[tox] +# py23,24,25 not supported by tox any more +envlist=py26,py27,pypy,py31,py32,py33,py34 + +[testenv] +setenv = + PYTHONHASHSEED = 0 + PYTHONPATH = . +commands = python test/test_argparse.py + -- cgit v1.2.1