Fix autodoc test for python 2.4

This commit is contained in:
William S Fulton 2013-03-29 09:15:39 +00:00
commit 5878ca5f1a
2 changed files with 20 additions and 17 deletions

View file

@ -1,4 +1,5 @@
from autodoc import * from autodoc import *
import sys
def check(got, expected): def check(got, expected):
if expected != got: if expected != got:
@ -121,6 +122,8 @@ check(A.func3static.__doc__, "\n"
" " " "
) )
if sys.version[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_a.__doc__, "A_variable_a_get(self) -> int")
check(A.variable_b.__doc__, "A_variable_b_get(A self) -> int") check(A.variable_b.__doc__, "A_variable_b_get(A self) -> int")
check(A.variable_c.__doc__, "\n" check(A.variable_c.__doc__, "\n"

View file

@ -1,7 +1,7 @@
import sys import sys
import file_test import file_test
if sys.version_info < (3,0): if sys.version[0:2] > (3, 0):
file_test.nfile(sys.stdout) file_test.nfile(sys.stdout)
cstdout = file_test.GetStdOut() cstdout = file_test.GetStdOut()