Skip to content
Snippets Groups Projects
Unverified Commit d6eb73a2 authored by Savici, Andrei T.'s avatar Savici, Andrei T. Committed by GitHub
Browse files

Merge pull request #23127 from mantidproject/doctests-free-memory

Only sleep after doctests if free memory is below 75%
parents 91af528a 7b7e4b42
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,12 @@ 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.75:
# 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