[Python Wpg] Testing for Python version
syd at plug.ca
Tue Oct 16 18:31:43 CEST 2007
I'm trying to create doctests that will work on multiple platforms, each
with different versions of Python. OSX includes version 2.3.0, which
doesn't have doctest.ELLIPSIS constant available, so I need to skip
using that constant on OSX. It seems as if the idiom for testing Python
version is sys.version_info[:3] >= (2,4,0):
if sys.version_info[:3] >= (2,4,0):
Does this seem like the "right" way to test python version?
I can't seem to find any definitive documentation about how to do this.
More information about the Winnipeg