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

Adding another prefix to the existing list of unittest_import_strs #339

Merged
merged 2 commits into from
Apr 7, 2023
Merged

Adding another prefix to the existing list of unittest_import_strs #339

merged 2 commits into from
Apr 7, 2023

Conversation

psathyan
Copy link
Contributor

Based on the test.id format found at id for those test module's throwing ImportError exceptions logic... the prefix for these tests would be unittest.loader._FailedTest

Snippet

(py311) [stack@osp-devstack-03 tempest]$ python -m stestr.subunit_runner.run discover -t "./" "./tempest/test_discover" --list

unittest.loader._FailedTest.cinder_tempest_plugin.api.volume.test_volume_revert

import errorsB�Failed to import test module: cinder_tempest_plugin.api.volume.test_volume_revert
Traceback (most recent call last):
  File "/usr/lib64/python3.11/unittest/loader.py", line 407, in _find_test_path
    module = self._get_module_from_name(name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/unittest/loader.py", line 350, in _get_module_from_name
    __import__(name)
  File "/opt/stack/tempest/.tox/py311/lib/python3.11/site-packages/cinder_tempest_plugin/api/volume/test_volume_revert.py", line 19, in <module>
    from tempest.lib import exception
ImportError: cannot import name 'exception' from 'tempest.lib' (/opt/stack/tempest/tempest/lib/__init__.py)

Signed-off-by: Pragadeeswaran Sathyanarayanan [email protected]

@psathyan psathyan changed the title Adding _FailedTestCase prefix for those test modules having import error. Adding another prefix to the existing list of unittest_import_strs Jan 18, 2023
Copy link
Owner

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mtreinish mtreinish merged commit d24afca into mtreinish:main Apr 7, 2023
@psathyan psathyan deleted the add_import_fail_str branch September 22, 2024 04:59
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.

2 participants