Ever run a bunch of unit tests that leaves files all over the file system like a bunch of mouse turds? You can't even see which of the 1000 unit tests you have wrote those files.
Bot wrote me some code to assert (in the code under test) that if a #pytest is running, assert it writing to tmp_path. To make this a 0 cost abstraction, it would need to intercept file IO like #pytest-network does for network calls. (AFAIK, no one has made that plugin)
https://chat.openai.com/share/95e8a898-ca24-4d50-9869-b791f6a17cff