> I would say at the very minimum, every function/method should be called at > least once; that's a good baseline. If you have complicated logic, you should > have tests that exercise each of the main different use cases. > Beyond that, it doesn't have to be exhaustive. > For example, if you look at my plugins tests, I think they're a bit on the > lighter side of testing IMO. > I use the tests to iterate on the source code, I've found it saves me a lot > of time. There's really nice helpers to build test input from docstrings, it > makes it fun. > > Otherwise I try to follow the Google style for Python development, except > with 4 space indent and underscore_case instead of camelCase. I run pylint > (see config under etc/) regularly on everything, and some custom scripts to > avoid unwanted dependency order.
We could create a repository under github.com/beancount/plugins-contrib, which has an integration for Travis CI (like Fava does) which defines and automatically runs the tests upon each commit/PR. -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/686A76E5-5E9C-4890-A5C1-701D05C050A7%40aumayr.name. For more options, visit https://groups.google.com/d/optout.
