SERG-Delft / andy

Andy assesses student's test code. It's used in CSE1110, TU Delft.
MIT License
78 stars 23 forks source link

Ignore spaces at the ends of lines in the MetaTest StringReplacementEvaluator, fixes #156 #233

Closed Una865 closed 1 year ago

Una865 commented 1 year ago

Added regex expression for capturing spaces on the end of the line.

Fixes #156

mauricioaniche commented 1 year ago

Just rebased and put the tests to run!

@martinmladenov this one is for you to merge once you feel it's ready!

mauricioaniche commented 1 year ago

Oh, tests are breaking?

mauricioaniche commented 1 year ago

Hey, @Una865, it seems like the tests are breaking. I just re-ran the pipeline with the most recent version of the code. Would you mind taking a look?

martinmladenov commented 1 year ago

Using \s in both sides of the regex caused blank lines to be removed by merging the previous and the next lines (e.g. 123\n\n456 would be turned into 123456). This was causing an exception when running meta tests, and meta tests would be mistakenly marked as passing when they shouldn't be due to #256. (However, this still doesn't explain why having this error in meta tests doesn't trigger a generic failure in the meta test sub-result but simply causes individual test cases to fail...)

martinmladenov commented 1 year ago

I trust our tests and according to them, this regex works! :laughing:

mauricioaniche commented 1 year ago

That's the answer I was looking for 😆