Skip to content
Myr

mkstemp returns a file descriptor (#3809)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Viet Hung Nguyen · committed by GitHub · parent 06495e7 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:docs/tutorial/tests.rst+1 added-1 removed
105 unmodified lines
106 def runner(app):107 return app.test_cli_runner()108109:func:`tempfile.mkstemp` creates and opens a temporary file, returning110the file object and the path to it. The ``DATABASE`` path is110the file descriptor and the path to it. The ``DATABASE`` path is111overridden so it points to this temporary path instead of the instance112folder. After setting the path, the database tables are created and the113test data is inserted. After the test is over, the temporary file is114closed and removed.
447 unmodified lines