BlueBrain / nmodl

Code Generation Framework For NEURON MODeling Language
https://bluebrain.github.io/nmodl/
Apache License 2.0
52 stars 15 forks source link

Myers diff algorithm for unit tests #1161

Closed ohm314 closed 3 months ago

ohm314 commented 6 months ago

This is a small new feature for a bit of convenience. This PR adds a proper diff implementation that can be invoked when a unit test fails. Instead of outputting the the raw generated strings and painstakingly comparing them, we can now simply diff them and print formatted output.

For now just one test case was updated as an example for initial feedback.

bbpbuildbot commented 6 months ago

Logfiles from GitLab pipeline #194925 (:no_entry:) have been uploaded here!

Status and direct links:

1uc commented 6 months ago

I'd propose thorough (unit-) testing. ~To me it looked like you intentionally broke the tests to show how it would fail. However the tests pass and don't show what this would look like when something fails.~

bbpbuildbot commented 6 months ago

Logfiles from GitLab pipeline #198072 (:no_entry:) have been uploaded here!

Status and direct links:

bbpbuildbot commented 6 months ago

Logfiles from GitLab pipeline #198084 (:no_entry:) have been uploaded here!

Status and direct links:

bbpbuildbot commented 3 months ago

Logfiles from GitLab pipeline #212074 (:no_entry:) have been uploaded here!

Status and direct links:

ohm314 commented 3 months ago

I'll close this. As discussed, it's not very high priority and unless someone has interest and finds the time this can just stay in a branch.