relate
relate copied to clipboard
relate test-code conflicts between files
I was in the middle of setting up the CI test following the script
run_yamls=()
for i in $( git grep --name-only PythonCodeQuestion *.yml ) ; do
# FIXME: https://github.com/inducer/relate/issues/951
if ! grep data_files "$i" > /dev/null ; then
run_yamls+=("$i")
fi
done
relate test-code "${run_yamls[@]}"
This ends up reusing the module from previous yml. To be specific, np.linalg.qr = not_allowed is set inside
problem-bank/homework-problems/eigenvalue/code-qr-iteration-givens.yml
Then, when running the next file, code-qr-iteration-shift.yml, the call of np.linalg.qr triggers the assertion error.
Potentially, we could fork before each test? This avoids paying for the interpreter startup cost repeatedly.
I don't know that there is a reliable way to reset a monkeypatched module to its original state. reload comes to mind, but what modules would one reload?
fork would also offer a way to parallelize runs.