diff --git a/Examples/test-suite/python/python_pickle_runme.py b/Examples/test-suite/python/python_pickle_runme.py index b58cca471..cf2847919 100644 --- a/Examples/test-suite/python/python_pickle_runme.py +++ b/Examples/test-suite/python/python_pickle_runme.py @@ -1,12 +1,19 @@ import python_pickle import pickle +import sys + +def is_new_style_class(cls): + return hasattr(cls, "__class__") def check(p): msg = p.msg if msg != "hi there": raise RuntimeError("Bad, got: " + msg) +if not is_new_style_class(python_pickle.PickleMe): + sys.exit(0) + python_pickle.cvar.debug = False p = python_pickle.PickleMe("hi there")