diff --git a/python/test.py b/python/test.py index 3fd44474..e5f6794b 100644 --- a/python/test.py +++ b/python/test.py @@ -1,3 +1,5 @@ +print("A") + import sys import argparse import snappy @@ -19,11 +21,15 @@ import snappy.exterior_to_link.test import snappy.pari +print("B") + from snappy.sage_helper import (_within_sage, doctest_modules, cyopengl_works, tk_root, root_is_fake, DocTestParser) from snappy import numeric_output_checker modules = [] +print("C") + snappy.database.Manifold = snappy.SnapPy.Manifold # Augment tests for SnapPy with those that Cython missed @@ -47,6 +53,8 @@ for key in identify_tests + triangulation_tests + browser_tests: snappy.SnapPyHP.__test__.pop(key) +print("D") + def snap_doctester(verbose): return snappy.snap.test.run_doctests(verbose, print_info=False) @@ -70,6 +78,8 @@ def snappy_database_doctester(verbose): return ans +print("E") + snappy_database_doctester.__name__ = 'snappy.database' @@ -101,6 +111,8 @@ def ptolemy_doctester(verbose): if not _within_sage: modules.append(snappy.number) +print("F") + modules += [snappy.SnapPy, snappy.SnapPyHP, snappy_database_doctester, @@ -136,6 +148,7 @@ def snappy_exterior_to_link_doctester(verbose): snappy_exterior_to_link_doctester.__name__ = 'snappy.exterior_to_link' modules.insert(0, snappy_exterior_to_link_doctester) +print("G") def graphics_failures(verbose, windows, use_modernopengl): if cyopengl_works(): @@ -173,10 +186,14 @@ def runtests(verbose=False, use_modernopengl=True, graphics=True): + print("K1") + # The default PARI stacksize can (slightly) overflow, causing # doctests to fail. snappy.pari.allocatemem(2**24, 2**25, silent=True) + print("K2") + DocTestParser.use_modernopengl = use_modernopengl result = doctest_modules(modules, verbose=verbose) @@ -208,6 +225,12 @@ def runtests(verbose=False, if __name__ == '__main__': + import sys + if sys.platform == 'darwin': + raise Exception() + + print("MAIN") + verbose = False quick = False windows = False @@ -231,4 +254,6 @@ def runtests(verbose=False, help='skip tests bringing up GUI windows.') args = parser.parse_args(useful_args) + print("MAIN2") + sys.exit(runtests(**vars(args)))