]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
qa/tasks/mgr: partial revert of 'import with full path'
authorKefu Chai <kchai@redhat.com>
Thu, 26 Mar 2020 06:33:06 +0000 (14:33 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 26 Mar 2020 06:37:06 +0000 (14:37 +0800)
commitb0bdbc34147c7e795e1a01cce1197b990c48effb
tree06c2853525da4b3d5bda438f110b6bf9acadfcb1
parent867bc6064482174c524a858a24f704450201535e
qa/tasks/mgr: partial revert of 'import with full path'

this change partially reverts #34139

using relative import helps with readability and ease the pain to write
down the full parent module name

in #34139, all relative imports were replaced with full path, because we
were using following code to verify if the code is python3 compatible:

```
  mod_spec = importlib.util.spec_from_file_location(mod_name, path)
  mod = importlib.util.module_from_spec(mod_spec)
  mod_spec.loader.exec_module(mod)
```

but this does not work with submodule which can import using relative
import without specifying the name of the package and its parent module.

Signed-off-by: Kefu Chai <kchai@redhat.com>
23 files changed:
qa/tasks/mgr/dashboard/test_auth.py
qa/tasks/mgr/dashboard/test_cephfs.py
qa/tasks/mgr/dashboard/test_cluster_configuration.py
qa/tasks/mgr/dashboard/test_crush_rule.py
qa/tasks/mgr/dashboard/test_erasure_code_profile.py
qa/tasks/mgr/dashboard/test_ganesha.py
qa/tasks/mgr/dashboard/test_health.py
qa/tasks/mgr/dashboard/test_host.py
qa/tasks/mgr/dashboard/test_logs.py
qa/tasks/mgr/dashboard/test_mgr_module.py
qa/tasks/mgr/dashboard/test_monitor.py
qa/tasks/mgr/dashboard/test_orchestrator.py
qa/tasks/mgr/dashboard/test_osd.py
qa/tasks/mgr/dashboard/test_perf_counters.py
qa/tasks/mgr/dashboard/test_pool.py
qa/tasks/mgr/dashboard/test_rbd.py
qa/tasks/mgr/dashboard/test_rbd_mirroring.py
qa/tasks/mgr/dashboard/test_requests.py
qa/tasks/mgr/dashboard/test_rgw.py
qa/tasks/mgr/dashboard/test_role.py
qa/tasks/mgr/dashboard/test_settings.py
qa/tasks/mgr/dashboard/test_summary.py
qa/tasks/mgr/dashboard/test_user.py