Closed JonathanPham closed 3 years ago
The relative imports are not working for the test cases, I'll have a look.
@JonathanPham I've modified run_tests.py
to execute the solver correctly
subprocess.check_output(['python', '-m', 'svzerodsolver.solver', inp])
However, the __init__.py
file needed by SV is causing problems because svzerodsolver
is being included twice. I have a workaround for that but maybe the testing should be reworked a bit.
For example, I am wondering why run_tests.py
is executing the solver using a Python script rather than just calling a function from solver.py
, something like
from . solver import run_solver
run_solver('solver.in')
When I originally created the test cases for the 0D solver, I thought the test cases should be similar the ones used by the 1D solver. As such, run_tests.py
here is based on the one used in the 1D solver. But like you said, maybe it's better if we rewrite run_tests.py
to just call a function from solver.py
directly. However, if we do this, would this conflict with the automated Travis testing (#28) that we want to include in the future? @ktbolt, @mrp089 any thoughts?
@ktbolt @mrp089 You're both right! The original testing was taken from the 1D solver (C++) and should be adapted as @ktbolt suggested.
I can do that next week!
Closed by #28
Due to reorganization of the svZeroDSolver,
test_cases/run_tests.py
no longer works.From within the
test_cases
directory, running the commands,python run_tests.py
or./run_tests.py
, do not work anymore. I am not sure how to fix this issue. @ktbolt can you help out?