summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Waldmann <tw AT waldmann-edv DOT de>2011-03-31 10:56:27 +0200
committerThomas Waldmann <tw AT waldmann-edv DOT de>2011-03-31 10:56:27 +0200
commitc9b3f9b32949cb7dd798e7d1aedbeeef064aa4b1 (patch)
tree1c812b08bde2caf5b13564060da8be7db21b0193
parent9fe4aaee1e373293418ce1123be3d64b18d6fb29 (diff)
downloadargparse-c9b3f9b32949cb7dd798e7d1aedbeeef064aa4b1.tar.gz
hack the tests to not have failures on py 2.3 and 3.xbaserock/morph
-rw-r--r--test/test_argparse.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/test_argparse.py b/test/test_argparse.py
index daead61..bfa5f9e 100644
--- a/test/test_argparse.py
+++ b/test/test_argparse.py
@@ -4366,8 +4366,13 @@ class TestImportStar(TestCase):
if not name.startswith("_")
if not inspect.ismodule(value)
]
- # this will fail on python 2.3 due to "set" and "sorted":
- # this will fail on python 3.1 due to "basestring"
+ # ignore "set" and "sorted" on python 2.3:
+ if sys.version_info[:2] == (2, 3):
+ items.remove("set")
+ items.remove("sorted")
+ # ignore "basestring" on python 3.x:
+ if sys.version_info[:2] >= (3, 0):
+ items.remove("basestring")
self.assertEqual(sorted(items), sorted(argparse.__all__))