Short answer: Use beangulp. Each importer can be invoked directly, with "identify", "extract", "archive" commands, but also "test" and "generate" commands. Write a driver script that will find all of the files you'd like to test and invoke your importer implementation (just the one .py file) on each of those files with the test command.
On Sat, Jan 8, 2022 at 3:15 PM David Richey <darich...@gmail.com> wrote: > Hello, > > I'm trying to set up regression tests for my importers, and I'm wondering > about how people tend to do this (beyond the basic setup described in the > docs). > > Specifically, would it be wrong to want to regression test all of my > imported documents? If not, do you manually copy all of them from the > "documents" directory to the "importers" directory? That feels bad. I > fiddled around with symlinking the former into the latter, but I couldn't > see any functionality in regression_pytest that would read the sample > files from one directory and output the .extract, .file_account, etc. files > to a different one (since I don't want to pollute my documents dir). > > Does anyone have any suggestions/thoughts on this? Either in my current > direction or moving towards not testing against all inputs (although this > initially makes me uneasy, maybe you can explain why it shouldn't). > > Regards, > David > > -- > You received this message because you are subscribed to the Google Groups > "Beancount" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to beancount+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/beancount/91792c68-aaf1-4479-89fc-fbcd7dbf0c9fn%40googlegroups.com > <https://groups.google.com/d/msgid/beancount/91792c68-aaf1-4479-89fc-fbcd7dbf0c9fn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to beancount+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAK21%2BhODceG-O-DSZSWjaV-9DYG21sX-0iP%3Do-_20ahsjG2p2g%40mail.gmail.com.