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 merge requests found
...@@ -8,7 +8,7 @@ import os ...@@ -8,7 +8,7 @@ import os
from sphinx import __version__ as sphinx_version from sphinx import __version__ as sphinx_version
import sphinx_bootstrap_theme # checked at cmake time import sphinx_bootstrap_theme # checked at cmake time
import mantid import mantid
from mantid import ConfigService from mantid.kernel import ConfigService
# If extensions (or modules to document with autodoc) are in another directory, # 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 # add these directories to sys.path here. If the directory is relative to the
...@@ -106,9 +106,13 @@ except TypeError: ...@@ -106,9 +106,13 @@ except TypeError:
doctest_global_cleanup = """ doctest_global_cleanup = """
import time import time
from mantid.api import FrameworkManager from mantid.api import FrameworkManager
from mantid.kernel import MemoryStats
FrameworkManager.Instance().clear() FrameworkManager.Instance().clear()
# sleep for short period to allow memory to be freed if MemoryStats().getFreeRatio() < 0.5:
time.sleep(2) # sleep for short period to allow memory to be freed
time.sleep(2)
""" """
# -- Options for pngmath -------------------------------------------------- # -- 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