Closed kmapb closed 8 months ago
Will look into failing pytest ...
Hi, @kmapb! Just saw that you wanted to look into the Python tests. They are already passing, I've just pushed the code. Now I'm in the processes of merging our changes. Will push them with a working GitHub CI.
Next up - checking which C++ interfaces are missing to start integrating into Chromium or other major C++ project, as planned 🤗
Looks like pytest has been broken for a while. After fixing the typing and pytest annotation issues, we're failing one of the asserts in sz_size_log2i in the guts of the sz_sort_introsort. We're about 8 frames deep in the hardware stack in an explicit recursion here. Let's see if I can figure out what went wrong; please hold the review for now in case it's something substantial.
Ah, yes, we call it with zero, which is undefined behavior. (0 has no logarithm in any base).
OK, now the majority of the test_fuzzy_substring
cases fail. Repushed with fixes for sort, retrying.
It's trying to execute a function named choice
introduced in c9aad691. No such function is present in that revision of the file, nor in HEAD. Assuming I need to reintroduce from random import choice
Yes, that's the random choice function. I am surprised the Python tests are failing for you. Maybe I need to shuffle better 🤔
Can I already sync our versions on main-dev
or do you want to push something else in this PR, @kmapb ?
I think I'm done now! Just squashed enough changes to get pytest running again.
Phew! Let's see what the automated tests think. If they're green, I think we're ready for review here.
Introducing some C++ unit tests uncovered a few bugs:
This change lightly refactors to make more of the above testable, tests them, and fixes the problems that surfaced. Code inspection also shows some memory leaks and other issues, but Rome wasn't built in a day and the patch is getting big as-is.