py2cr
py2cr copied to clipboard
Support UnitTest to Crystal Spec conversion
It would be useful to be able to convert the python unittest format (the default and core library for python testing) into the Spec format that Crystal uses. This may require some heavy tree manipulation and require taking some opinionated positions with the translation.
Something like:
- each Python class that interits
unittest.TestCasebe converted into adescribe - each
test_*function in the class be converted into ait - each
self.assert*convert into the appropriateshouldclause, which will require rearrangement, especially for exception handling. - support for setUp/tearDown, though the semantics differ significantly between cases.
Adding this in may eventually allow for easier and faster regression of some parts of this project, as the current methodology suffers from "death by a thousand compiles"