Skip to content

Commit

Permalink
Testing CI
Browse files Browse the repository at this point in the history
  • Loading branch information
unhyperbolic committed Apr 2, 2024
1 parent 6c064e1 commit 31ee54c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions python/test.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
print("A")

import sys
import argparse
import snappy
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -70,6 +78,8 @@ def snappy_database_doctester(verbose):

return ans

print("E")


snappy_database_doctester.__name__ = 'snappy.database'

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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():
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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)))

0 comments on commit 31ee54c

Please sign in to comment.