Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support UnitTest to Crystal Spec conversion #6

Open
nanobowers opened this issue Jan 21, 2023 · 0 comments
Open

Support UnitTest to Crystal Spec conversion #6

nanobowers opened this issue Jan 21, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@nanobowers
Copy link
Owner

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.TestCase be converted into a describe
  • each test_* function in the class be converted into a it
  • each self.assert* convert into the appropriate should clause, 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"

@nanobowers nanobowers added the enhancement New feature or request label Jan 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant