cfpb / hackathon

planning a hack day at CFPB.
http://cfpb.github.io/hackathon/
Creative Commons Zero v1.0 Universal
5 stars 7 forks source link

Macro Polo #12

Closed willbarton closed 7 years ago

willbarton commented 8 years ago

Macro Polo is a Python library for unit testing template macros. It is meant to test that the template output is as expected, and can be contrasted with functional/browser testing of the functionality of the template output. Macro Polo allows test specification to happen in Python or in JSON.

There are currently two issues open that would increase the usefulness of Macro Polo that could be addressed. The first, cfpb/macropolo#4, is about testing private Jinja2 macros. Currently Macro Polo can only test public macros. The second, cfpb/macropolo#5, is about possible pre-processing class selectors to make them a bit less awkward before passing them to BeautifulSoup.

Additionally, it would be great if other template systems could be supported, like plain Django templates.

This will take some knowledge of Jinja2 and Python, possibly Django if you want to work on Django templates.