GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Perhaps keyword arguments would be better than positional arguments. That is: have contexts yield dictionaries, and pass by key name rather than position. This might not be backwards-compatible without some switch.
yield dict(app=app, templates=templates)
assert len(templates) == 1
Currently the above would treat the dict as a single, positional argument. If we had yielded a two-tuple, the test would receive the app as 'templates'. The benefit of this idea is that we can easily "skip" arguments. Downsides would be the need to name argument and the possibility of name conflicts (however unlikely).