beancount / smart_importer

Augment Beancount importers with machine learning functionality.
MIT License
248 stars 29 forks source link

Add data based tests #18

Closed tarioch closed 6 years ago

tarioch commented 6 years ago

I think it would be great to have data based tests to cover lots of use cases. I'm having some really bad predictions which I would like to narrow down with that.

@johannesjh would you have an issue if I switch over to pytest as this has some support for test generators

johannesjh commented 6 years ago

One consideration is which test frameworks are used in fava and beancount (to ease future integration with their code). Beancount's regression tests yield generated nose tests, see beancount/beancount/ingest/regression.py. So if nose suits your requirements, it would probably be the better choice.

tarioch commented 6 years ago

Makes sense. On my importers I use pytest to run the nose tests as it looks like nose is pretty much end of life. I might actually for now even go with the simplest case and not use any generator and simply add a method with the arguments for each test case

johannesjh commented 6 years ago

sounds good, it is sometimes best to keep it simple.

PS, Edited: Besides that, pytest seems to be the new framework of choice, you are right!