Fix Python version checking in Python tests
This commit is contained in:
parent
8700e79b3e
commit
074c0039db
3 changed files with 3 additions and 3 deletions
|
|
@ -122,7 +122,7 @@ check(A.func3static.__doc__, "\n"
|
|||
" "
|
||||
)
|
||||
|
||||
if sys.version[0:2] > (2, 4):
|
||||
if sys.version_info[0:2] > (2, 4):
|
||||
# Python 2.4 does not seem to work
|
||||
check(A.variable_a.__doc__, "A_variable_a_get(self) -> int")
|
||||
check(A.variable_b.__doc__, "A_variable_b_get(A self) -> int")
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import sys
|
||||
import file_test
|
||||
|
||||
if sys.version[0:2] > (3, 0):
|
||||
if sys.version_info[0:2] < (3, 0):
|
||||
file_test.nfile(sys.stdout)
|
||||
|
||||
cstdout = file_test.GetStdOut()
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ def container_insert_step(i, j, step, newval):
|
|||
il_error = e
|
||||
|
||||
# Python 2.6 contains bug fixes in extended slicing syntax: http://docs.python.org/2/whatsnew/2.6.html
|
||||
skip_check = ps_error != None and(iv_error == il_error == None) and step > 0 and (sys.version[0:2] < (2, 6))
|
||||
skip_check = ps_error != None and(iv_error == il_error == None) and step > 0 and (sys.version_info[0:2] < (2, 6))
|
||||
if not(skip_check):
|
||||
if not((type(ps_error) == type(iv_error)) and (type(ps_error) == type(il_error))):
|
||||
raise RuntimeError, "ValueError exception not consistently thrown: " + str(ps_error) + " " + str(iv_error) + " " + str(il_error)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue