Originally posted by **alfechner** November 25, 2021
Hi,
we've got a tool which generates a bunch of files in a nested directory structure. We test the tool by snapshotting the entire directory and save it in exactly the same structure for comparison. Would you be interested in a PR to incorporate this peace of functionality?
Cheers,
Alex
snapshot.assert_match_dir
should support snapshotting nested dictionaries as a nested directory structure.For example
will create a directory named
snapshot-name
containingfile1.txt
andsub_directory
.sub_directory
will containfile2.txt
.Discussed in https://github.com/joseph-roitman/pytest-snapshot/discussions/46