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

First draft of python based tests #10

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Luv2C0d3
Copy link

@Luv2C0d3 Luv2C0d3 commented Jan 29, 2023

NOTE: Still work in progress, if ok, we should possibly add more tests.

Good day. This is a different approach to providing some tests. This approach is less invasive in that it uses just a small python program to test tinylisp or any of its siblings. I put things in a test folder as you requested, to keep it out of the main workflow and keep things simple.

Pros of this approach:

  • Less invasive.
  • Easier to put in practice as it uses a scripting language.
  • Written in simple python code to make it easy to understand.
  • Should work unchanged in Windows, except for invoking it with python test_runner.py instead of just the script as can be done in Linux.

Cons:

  • I cannot unit test things in depth as I can do in a C based test.
  • It is not written in C and requires some Python knowledge.
  • It spawns one program instance per test. This should not be too much of a problem as it still runs very fast because tinylisp loas very fast.

Anyhow, tell me what you think? We could use this approach or if there is value a mix of Python + C tests, but for now it seems only one should be sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant