Skip to content

Running tests with DPNP_TEST_ALL_INT_TYPES= raised an exception #2324

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

Closed
antonwolfy opened this issue Feb 18, 2025 · 0 comments · Fixed by #2415
Closed

Running tests with DPNP_TEST_ALL_INT_TYPES= raised an exception #2324

antonwolfy opened this issue Feb 18, 2025 · 0 comments · Fixed by #2415
Assignees

Comments

@antonwolfy
Copy link
Contributor

The bellow command to run dpnp tests causes the issue:

$ DPNP_TEST_ALL_INT_TYPES= python -m pytest -ra -x --pyargs dpnp.tests
...
/localdisk/work/antonvol/soft/miniforge3/envs/test_issue/lib/python3.12/site-packages/dpnp/tests/test_absolute.py:7: in <module>
    from .helper import (
/localdisk/work/antonvol/soft/miniforge3/envs/test_issue/lib/python3.12/site-packages/dpnp/tests/helper.py:10: in <module>
    from . import config
/localdisk/work/antonvol/soft/miniforge3/envs/test_issue/lib/python3.12/site-packages/dpnp/tests/config.py:3: in <module>
    all_int_types = int(os.getenv("DPNP_TEST_ALL_INT_TYPES", 0))
E   ValueError: invalid literal for int() with base 10: ''
...

It seems the way how env variable DPNP_TEST_ALL_INT_TYPES is handled in tests needs to be corrected.

@antonwolfy antonwolfy self-assigned this Feb 18, 2025
github-actions bot added a commit that referenced this issue Apr 13, 2025
The PR closes #2324. It is proposes to cast test env variables with
dtype scope to boolean value which can handle empty string as a False
value. 130a24a
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 a pull request may close this issue.

1 participant