summaryrefslogtreecommitdiffstats
path: root/test/EnsureVersion.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/EnsureVersion.py')
-rw-r--r--test/EnsureVersion.py42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/EnsureVersion.py b/test/EnsureVersion.py
index d24e010..c4005e0 100644
--- a/test/EnsureVersion.py
+++ b/test/EnsureVersion.py
@@ -76,4 +76,46 @@ sys.exit(0)
test.run(status=2)
+test.write('SConstruct', """\
+import sys
+delattr(sys, 'version_info')
+sys.version = '2.3b1 (#0, Feb 24 2003, 19:13:11)\\n'
+EnsurePythonVersion(1,3)
+sys.exit(0)
+""")
+
+test.run()
+
+test.write('SConstruct', """\
+import sys
+delattr(sys, 'version_info')
+sys.version = '2.3+ (#0, Feb 24 2003, 19:13:11)\\n'
+EnsurePythonVersion(2,2)
+sys.exit(0)
+""")
+
+test.run()
+
+test.write('SConstruct', """\
+import sys
+delattr(sys, 'version_info')
+sys.version = '2.3b1 (#0, Feb 24 2003, 19:13:11)\\n'
+EnsurePythonVersion(2,3)
+sys.exit(0)
+""")
+
+test.run()
+
+test.write('SConstruct', """\
+import sys
+delattr(sys, 'version_info')
+sys.version = '2.3b1 (#0, Feb 24 2003, 19:13:11)\\n'
+EnsurePythonVersion(2,4)
+sys.exit(0)
+""")
+
+test.run(status=2)
+
+
+
test.pass_test()