Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Trac #33213: ensure temporary gap workspace is created in a doctest.
Browse files Browse the repository at this point in the history
  • Loading branch information
orlitzky committed Feb 18, 2022
1 parent 0f90d98 commit de4a00e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sage/interfaces/gap.py
Original file line number Diff line number Diff line change
Expand Up @@ -1476,9 +1476,11 @@ def gap_reset_workspace(max_workspace_size=None, verbose=False):
TESTS:
Check that the race condition from :trac:`14242` has been fixed.
We temporarily need to change the worksheet filename. ::
We temporarily need to change the worksheet filename, and to set
``first_try=True`` to ensure that the new workspace is created::
sage: ORIGINAL_WORKSPACE = sage.interfaces.gap.WORKSPACE
sage: sage.interfaces.gap.first_try = True
sage: sage.interfaces.gap.WORKSPACE = tmp_filename()
sage: from multiprocessing import Process
sage: import time
Expand All @@ -1491,6 +1493,7 @@ def gap_reset_workspace(max_workspace_size=None, verbose=False):
....: p.join()
sage: os.unlink(sage.interfaces.gap.WORKSPACE) # long time
sage: sage.interfaces.gap.WORKSPACE = ORIGINAL_WORKSPACE
sage: sage.interfaces.gap.first_try = False
"""
# Create new workspace with filename WORKSPACE
g = Gap(use_workspace_cache=False, max_workspace_size=None)
Expand Down

0 comments on commit de4a00e

Please sign in to comment.