mitsuba-renderer / mitsuba3

Mitsuba 3: A Retargetable Forward and Inverse Renderer
https://www.mitsuba-renderer.org/
Other
2.1k stars 246 forks source link

Filesystem test: use tmp_path for writing files #1275

Closed dvicini closed 3 months ago

dvicini commented 3 months ago

The filesystem test uses the current path (path_here), which is the directory from which pytest is run. This is fine for testing path-related logic (e.g., assert fs.is_directory(path_here)), but not ideal when creating test files and directories.

This commit changes this test to only create new files and directories within a temporary folder (tmp_path). This decouples running this test from the permissions the user has on the current working directory.