marianoguerra / rst2html5

transform restructuredtext documents to html5 + twitter's bootstrap css, deck.js or reveal.js
http://marianoguerra.github.com/rst2html5
MIT License
177 stars 51 forks source link

Fix #75: Add test framework. #77

Closed torfsen closed 8 years ago

torfsen commented 8 years ago

This PR fixes #75 (Add test framework).

I've added the necessary configuration for running tests via pytest and tox. Only the latter needs to be manually installed, since tox will automatically install pytest if necessary.

The test cases can be found in html5css3/tests.py. The README has been updated with instructions on how to run the tests.

Currently there are only two test cases (for checking that #72 and #73 are fixed), but adding new test cases should be easy using the utility functions that I've added to html5css3.tests (in particular assert_rst).

Currently tests are run against Python 2.7 and Python 3.4. Feel free to add more Python versions (e.g. Python 3.5) to the list in tox.ini. Obviously you will need to locally install any Python version that you want to run the tests on (tox will ignore versions that are not installed locally, so there is little harm in adding more versions).

marianoguerra commented 8 years ago

nice work!

btw, I see you are from Germany (Karlsruhe specifically, I studied at KIT for a semester :D), now I'm living in Stuttgart :)

torfsen commented 8 years ago

Yeah, I've noticed! I've actually lived in Stuttgart for 3 years before moving to Karlsruhe 2 years ago. It's like we just switched places :)