allow tests to run even if the underlying python shared module uses a different private name (osx builds)

This commit is contained in:
Dane Springmeyer 2011-07-12 19:55:26 +00:00
parent 3d862034cd
commit 73e58c22a1

View file

@ -6,14 +6,14 @@ from nose.plugins.doctests import Doctest
import nose, sys, os, getopt import nose, sys, os, getopt
def usage(): def usage():
print "test.py -h | --help" print("test.py -h | --help")
print "test.py [-q | -v] [-p | --prefix <path>]" print("test.py [-q | -v] [-p | --prefix <path>]")
def main(): def main():
try: try:
opts, args = getopt.getopt(sys.argv[1:], "hvqp:", ["help", "prefix="]) opts, args = getopt.getopt(sys.argv[1:], "hvqp:", ["help", "prefix="])
except getopt.GetoptError, err: except getopt.GetoptError as err:
print str(err) print(str(err))
usage() usage()
sys.exit(2) sys.exit(2)
@ -45,13 +45,14 @@ def main():
import mapnik2 import mapnik2
if not quiet: if not quiet:
print "- mapnik2 path: %s" % mapnik2.__file__ print("- mapnik2 path: %s" % mapnik2.__file__)
print "- _mapnik2.so path: %s" % mapnik2._mapnik2.__file__ if hasattr(mapnik2,'_mapnik2'):
print "- Input plugins path: %s" % mapnik2.inputpluginspath print("- _mapnik2.so path: %s" % mapnik2._mapnik2.__file__)
print "- Font path: %s" % mapnik2.fontscollectionpath print("- Input plugins path: %s" % mapnik2.inputpluginspath)
print print("- Font path: %s" % mapnik2.fontscollectionpath)
print "- Running nosetests:" print()
print print("- Running nosetests:")
print()
argv = [__file__, '--exe', '--with-todo', '--with-doctest', '--doctest-tests'] argv = [__file__, '--exe', '--with-todo', '--with-doctest', '--doctest-tests']