Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

relate test-code conflicts between files #1248

Open
yslan opened this issue Jan 17, 2025 · 2 comments
Open

relate test-code conflicts between files #1248

yslan opened this issue Jan 17, 2025 · 2 comments

Comments

@yslan
Copy link
Contributor

yslan commented Jan 17, 2025

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.

@inducer
Copy link
Owner

inducer commented Jan 17, 2025

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?

@inducer
Copy link
Owner

inducer commented Jan 17, 2025

fork would also offer a way to parallelize runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants