JSAbrahams / mamba

🐍 The Mamba programming language, because we care about safety
MIT License
88 stars 4 forks source link

Verify core output by verifying ast of Python output #122

Closed JSAbrahams closed 5 years ago

JSAbrahams commented 5 years ago

Current Issue

We don't systematically test that outputted Python files, so we have no way of checking they are semantically similar. In most cases, we simply test that Mamba files can be parsed at the moment.

High-level description of the feature

A simple way of doing this is by writing Python code and storing these in the test resources. We can then compare these to the output of our pipeline.

Description of potential implementation

We can then use a python library, or something along those lines, to convert both the Python resource and the outputted Python files. This makes the test cases less brittle and cumbersome to write than doing string comparisons. We can then easily, visually and quickly verify that outputted Python code is what we expect it to be.