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

Speed up Python testing #56

Merged
merged 5 commits into from
Nov 10, 2024
Merged

Speed up Python testing #56

merged 5 commits into from
Nov 10, 2024

Conversation

JosephTLyons
Copy link
Owner

@JosephTLyons JosephTLyons commented Nov 10, 2024

Closes: #18

Before, every IntegerTestData and FloatTestData opened up a new Python program and sent one value to it. Every new test opened another Python instance. Now, we only run two Python instances, one for IntegerTestData and one for FloatTestData. For each test data type, we take all test data and serialize it into json, pass it to Python, process the values, serialize the results, and return them. With 420 tests, tests would take 4+ seconds to run, now, tests run in the sub 100 ms range (~1.75% the original time) and shouldn't grow noticeably over time.

The work this PR also opens up the door for us to map Python error type, within the python program, to an error type we can understand in Gleam, and then assert that our error matches theirs, via some mapping of ours to theirs.

See #55

Need to do a little bit of clean up to make this mergeable, but feeling good. 💪

@JosephTLyons JosephTLyons changed the title WIP Speed up Python testing Nov 10, 2024
@JosephTLyons JosephTLyons merged commit 6b2c429 into main Nov 10, 2024
1 check passed
@JosephTLyons JosephTLyons deleted the speed-up-python-tests branch November 10, 2024 19:57
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.

Speed up python tests
1 participant