swig/Examples/test-suite/python/python_append_runme.py
Olly Betts 728b8955bd Drop support for Python classic classes
There were only needed to support Python < 2.2, and we now require at
least Python 2.6.

 Conflicts:
	.travis.yml
	Examples/test-suite/python/autodoc_runme.py
	Source/Modules/python.cxx

This is a cherry-pick and merge from patch in #1261
2018-10-12 07:10:47 +01:00

23 lines
541 B
Python

from python_append import *
# test not relevant for -builtin
if is_python_builtin():
exit(0)
t = Test()
t.funk()
t.static_func()
if grabpath() != os.path.dirname(mypath):
raise RuntimeError("grabpath failed")
if grabstaticpath() != os.path.basename(mypath):
raise RuntimeError("grabstaticpath failed")
clearstaticpath()
if grabstaticpath() != None:
raise RuntimeError("Resetting staticfuncpath failed")
Test.static_func()
if grabstaticpath() != os.path.basename(mypath):
raise RuntimeError("grabstaticpath failed")