-
Notifications
You must be signed in to change notification settings - Fork 5
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
jock: don't run tests repeatedly #13
base: master
Are you sure you want to change the base?
Conversation
Hi, great find! If you just preface the ^- (list ...) statement with the ~+ rune, it won't re-execute every time because the expression will be memoized. A bit cleaner, but the same idea! |
Actually, memoization was the first solution I tried, but it didn't work (and still doesn't) for some reason. I attempted placing One potential issue with memoization is that if one test crashes at runtime, the other tests won't run, which may or may not be the desired behavior. |
A cleaner solution might be dynamically importing all tests from that folder (perhaps bringing the |
If there is any change in the subject then that will break memoization, since the memoization key is the pair of subject and formula. Very often an explicit tisgar which brings into scope only and exactly what's necessary will fix memoization. |
I'm interested in |
@sigilante I'd like to wait on merging this until we have ~+ working here, for simplicity. |
Thanks, @eamsden! I didn’t know about this. However: Even if I simplify the subject to be:
and
It still doesn’t memoize properly. |
Just realized that |
So, to clarify, |
That's right, I removed |
@marcusmiguel status update: after I fix |
It seems to me that we want to keep |
I don't think that this PR changes anything except for making |
test-jocks
runs at every step of the loop, causing all tests to be executed repeatedly. This PR addresses the issue by wrapping them in traps and ensuring each test runs only once.