Disable ttyrec recording by default in tests to avoid polluting the directory in which tests are run#105
Disable ttyrec recording by default in tests to avoid polluting the directory in which tests are run#105jbcoe wants to merge 1 commit intoNetHack-LE:mainfrom
Conversation
|
I've just ignored the file so far! |
|
If this is know about, I'll consider my investigation complete. I don't think that running tests should need write access to the working directory, this PR fixes that. |
|
As a principle, I prefer to have the tests clean up any files that are created as part of the normal run rather than have the test modify the code like that. What do you think? |
|
We could explicitly supply I'm not too fond of the monkey-patching as it's brittle. Ideally Nethack instances would not write to disk by default but that feels like a larger change. |
|
I'd prefer the We could also some new tests to explicitly create a named ttyrec file and the default one to check that it continues to work, and have those tests clean up after themselves. I think creating a ttyrec is a really important feature though. Imagine getting an agent to ascend and not having a recording of it! 😱 |
Before this change, a file (
nle.ttyrec3.bz2) is written to the project root when tests are run. I'm curious as to why we've not spotted this before.Investigation in progress so leaving this as a draft for now.