Files
Gymnasium/gym/wrappers/monitoring/tests/helpers.py

10 lines
160 B
Python
Raw Normal View History

import contextlib
import shutil
import tempfile
@contextlib.contextmanager
def tempdir():
temp = tempfile.mkdtemp()
yield temp
shutil.rmtree(temp)