Skip to content
Snippets Groups Projects
Unverified Commit 5f426e69 authored by Gigg, Martyn Anthony's avatar Gigg, Martyn Anthony Committed by GitHub
Browse files

Only sleep after doctests if free memory is below 50%

parent 2aa5f55c
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ import os
from sphinx import __version__ as sphinx_version
import sphinx_bootstrap_theme # checked at cmake time
import mantid
from mantid import ConfigService
from mantid.kernel import ConfigService
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
......@@ -106,9 +106,13 @@ except TypeError:
doctest_global_cleanup = """
import time
from mantid.api import FrameworkManager
from mantid.kernel import MemoryStats
FrameworkManager.Instance().clear()
# sleep for short period to allow memory to be freed
time.sleep(2)
if MemoryStats().getFreeRatio() < 0.5:
# sleep for short period to allow memory to be freed
time.sleep(2)
"""
# -- Options for pngmath --------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment