mwouts / jupytext

Jupyter Notebooks as Markdown Documents, Julia, Python or R scripts
https://jupytext.readthedocs.io
MIT License
6.65k stars 386 forks source link

Write temporary notebooks to a `TemporaryDirectory` rather than `NamedTemporaryFile` #1206

Closed mwouts closed 7 months ago

mwouts commented 10 months ago

Currently the jupytext --check or jupytext --pipe commands write the temporary Python files or notebooks to a temp file created with NamedTemporaryFile.

This file is located directly under \tmp\ and this breaks a test involving pytest==8.0.0rc1 (https://github.com/pytest-dev/pytest/issues/11807).

We should be able to solve this by using TemporaryDirectory instead.