sonntagsgesicht/regtest ? reverse-engineered prompt
Reverse engineered prompt
Build me a small Python library that helps with regression testing for unittest based projects.
I want to write test routines that run my application or helper functions, save the first run results into reference files, and then compare future runs against those saved results so I can catch changes easily. If a reference file is missing, the library should rebuild it automatically on the next test run. It should feel simple to use inside normal unittest tests, and it should support checking that return values stay the same over time.
Please include clear documentation and a few tests that show the basic workflow, like creating reference data, reusing it, and resetting it by deleting the saved file. Make it easy for someone maintaining an existing application to add lots of like for like tests without manually hardcoding all expected outputs. If you need to check anything about current Python packaging or unittest behavior, look up the current docs online.
Are you gonna build this?
make sure you review the code using coderabbit