maths / moodle-qtype_stack

Stack question type for Moodle
GNU General Public License v3.0
138 stars 147 forks source link

Request for stack_include_contrib: Move s_test_case lines into a new file #1184

Closed LukeLongworth closed 1 month ago

LukeLongworth commented 1 month ago

As discussed in #1129, stack_include simply inserts the desired code into the question variables. This raises some problems when we include test cases in the same file as the desired inclusions.

Would it be possible or desirable to move all of the s_test_case files into a separate file that s_test_case.mac checks, but isn't included with stack_include_contrib? Either one big file for all contributions, or a separate file for each contribution.

sangwinc commented 1 month ago

@LukeLongworth, I think we should move all the test cases into another file. Instead of X.mac we call it X_test.mac. That way, test files and their parent files correspond, but we only load the code. Putting all tests into one file would be messy.

LukeLongworth commented 1 month ago

Perfect, thanks Chris. This was exactly the type of solution I was hoping for!