1 # reload seems to work for Python 2.3 but not 2.2.
5 # debugging the 2.2 problem
7 from distutils
import sysconfig
9 sysconfig
.set_python_build()
10 except AttributeError:
13 print pyxbuild
.distutils
.sysconfig
== sysconfig
16 tempdir
= test_pyximport
.make_tempdir()
17 sys
.path
.append(tempdir
)
18 hello_file
= os
.path
.join(tempdir
, "hello.pyx")
19 open(hello_file
, "w").write("x = 1; print x; before = 'before'\n")
23 time
.sleep(1) # sleep to make sure that new "hello.pyx" has later
24 # timestamp than object file.
26 open(hello_file
, "w").write("x = 2; print x; after = 'after'\n")
28 assert hello
.x
== 2, "Reload should work on Python 2.3 but not 2.2"
29 test_pyximport
.remove_tempdir(tempdir
)
31 if __name__
=="__main__":