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

test: Add skipif decorator to handle CGEMS directory access (issue #336) #337

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

jaamarks
Copy link
Collaborator

What

This PR updates the unit test test_get_cgems_production_run_dir in tests/cli/test_config.py by adding a skipif decorator. This decorator allows the test to be skipped if CGEMS_QC_DIR is inaccessible.

Why

When CGEMS_QC_DIR is unavailable (due to permission issues or running the test on a machine without access), the test_get_cgems_production_run_dir fails. Skipping the test in such scenarios avoids misleading failures. The test itself focuses on the function's functionality, not external directory access.


Fixes #336

This update introduces the `skipif` decorator in the test to ensure that
if the user does not have access to the CGEMS_QC_DIR, the test will be
skipped instead of failing.
@jaamarks jaamarks merged commit fe79148 into default Oct 1, 2024
2 checks passed
@jaamarks jaamarks deleted the issue336/skip-cgems-test branch October 2, 2024 12:03
@jaamarks jaamarks changed the title test: Add skipif decorator to handle CGEMS directory access test: Add skipif decorator to handle CGEMS directory access (issue #336) Oct 7, 2024
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

Successfully merging this pull request may close these issues.

Test in tests/cli/test_config.py always fails if user has no access
1 participant