Tests that capture stdout or stderr output as files ("snapshots") now keep a file named name that contains the test name. When a test suite runs, testo checks for snapshot folders that no longer belong to a known test (which happens when renaming or deleting tests). These dead snapshot folders are now reported as follows:
1 folder no longer belongs to the test suite and can be removed:
tests/snapshots/testo_tests/1f85f39d5e9a user output capture
The test name user output capture is extracted from the file tests/snapshots/testo_tests/1f85f39d5e9a/name.
Other ways to work with dead snapshots include:
$ cat tests/snapshots/testo_tests/1f85f39d5e9a/name
user output capture
This takes care of #58 and #59. I don't know if we're going to need a special subcommand or option to delete dead snapshots. We can add it later if rm-ing these folders by hand turns out to be tedious.
PR checklist:
[x] Purpose of the code is evident to future readers
[x] Tests are included or a PR comment includes a reproducible test plan
[x] Documentation is up-to-date
[x] A changelog entry was added to CHANGES.md for any user-facing change
Tests that capture stdout or stderr output as files ("snapshots") now keep a file named
name
that contains the test name. When a test suite runs, testo checks for snapshot folders that no longer belong to a known test (which happens when renaming or deleting tests). These dead snapshot folders are now reported as follows:The test name
user output capture
is extracted from the filetests/snapshots/testo_tests/1f85f39d5e9a/name
.Other ways to work with dead snapshots include:
or
This takes care of #58 and #59. I don't know if we're going to need a special subcommand or option to delete dead snapshots. We can add it later if rm-ing these folders by hand turns out to be tedious.
PR checklist:
CHANGES.md
for any user-facing changeCheck out
CONTRIBUTING.md
for more details.