summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2014-10-16 07:55:14 +0200
committerAnthon van der Neut <anthon@mnt.org>2014-10-16 07:55:14 +0200
commitd150cfed69a796bcbcb4a55a57193b8da8027750 (patch)
treeccd4fc8dfb180257fb7dae3283a6aae8943805a4
parent59dfe13f5b31a4160fb0365dfab0c74d674b1e3b (diff)
downloadruamel.std.argparse-d150cfed69a796bcbcb4a55a57193b8da8027750.tar.gz
- include argparse for 2.6 (tox would work because dependency on
pytest includes it) - minor adaptation of test to 2.6 as the argparse 1.2 orders some help output differently from the 2.7+ version
-rw-r--r--__init__.py2
-rw-r--r--setup.py4
-rw-r--r--test/test_program.py6
3 files changed, 8 insertions, 4 deletions
diff --git a/__init__.py b/__init__.py
index da35031..7434f51 100644
--- a/__init__.py
+++ b/__init__.py
@@ -32,7 +32,7 @@ def _convert_version(tup):
# <
-version_info = (0, 3, 1)
+version_info = (0, 3, 2)
__version__ = _convert_version(version_info)
del _convert_version
diff --git a/setup.py b/setup.py
index e36bc9f..d41f485 100644
--- a/setup.py
+++ b/setup.py
@@ -115,8 +115,8 @@ class MyInstallLib(install_lib.install_lib):
def main():
install_requires = [
]
- #if sys.version_info < (3, 4):
- # install_requires.append("")
+ if sys.version_info[:2] == (2, 6):
+ install_requires.append("argparse")
packages = [full_package_name] + [(full_package_name + '.' + x) for x
in find_packages(exclude=['tests'])]
setup(
diff --git a/test/test_program.py b/test/test_program.py
index e4bb947..6d7bc5b 100644
--- a/test/test_program.py
+++ b/test/test_program.py
@@ -157,7 +157,11 @@ class TestProgram:
program._parse_args('-h'.split())
pho = ParseHelpOutput(capsys)
assert pho.start('positional arguments', 'hg')
- assert pho.somewhere('usage', 'c,d,f,e')
+ if sys.version_info[:2] == (2,6):
+ # 2.6 argparse scrambles order
+ assert pho.somewhere('usage', 'git,e,d,f')
+ else:
+ assert pho.somewhere('usage', 'c,d,f,e')
assert pho.start('optional arguments', '--verbose')
def test_help_sub_parser(self, capsys, program):