Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagesmc
Path: blob/master/src/sage/doctest/tests/atexit.rst
8817 views
Register an atexit function to remove the file given by the
``DOCTEST_DELETE_FILE`` environment variable::

    sage: import atexit
    sage: fn = os.environ['DOCTEST_DELETE_FILE']
    sage: atexit.register(os.unlink, fn)
    <built-in function unlink>