You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it is possible to change the tests code so that it is easier to read and maintain:
Currently the tests use sys.path.append for the imports instead of importing torchquad, so __init__.py is not executed.
It may be possible to shorten the code by replacing the setup_test_for_backend with parameterized tests.
utils_integration_test.py shows warnings while the other code uses pytest skips if a backend is not installed. The code could be changed so that pytest skips are used everywhere.
Some of these changes may however make it more difficult to support the execution of the test files with python3 in addition to pytest.
The text was updated successfully, but these errors were encountered:
FHof
changed the title
Pytests code style
Code style in the tests
Feb 24, 2022
I think it is possible to change the tests code so that it is easier to read and maintain:
sys.path.append
for the imports instead of importing torchquad, so__init__.py
is not executed.utils_integration_test.py
shows warnings while the other code uses pytest skips if a backend is not installed. The code could be changed so that pytest skips are used everywhere.Some of these changes may however make it more difficult to support the execution of the test files with
python3
in addition topytest
.The text was updated successfully, but these errors were encountered: