Skip to content
New issue

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

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

Already on GitHub? # to your account

Code style in the tests #41

Closed
FHof opened this issue Feb 24, 2022 · 1 comment
Closed

Code style in the tests #41

FHof opened this issue Feb 24, 2022 · 1 comment

Comments

@FHof
Copy link
Owner

FHof commented Feb 24, 2022

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.

@FHof FHof changed the title Pytests code style Code style in the tests Feb 24, 2022
@FHof
Copy link
Owner Author

FHof commented Apr 30, 2022

Moved to esa#144

@FHof FHof closed this as completed Apr 30, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant