selftests/unit/test_runner_queue.py: use absolute path for module
Looks like the Python 3 module import code behaves differently than
Python 2 with regards to where it looks modules by name:
File "/home/cleber/src/avocado/avocado/avocado/core/test.py", line 932, in _run_avocado
raise test_exception
File "/home/cleber/src/avocado/avocado/avocado/core/test.py", line 819, in _run_avocado
testMethod()
File "/home/cleber/src/avocado/avocado/avocado/core/test.py", line 1371, in test
self.error(self.exception)
File "/home/cleber/src/avocado/avocado/avocado/core/test.py", line 1041, in error
raise exceptions.TestError(message)\navocado.core.exceptions.TestError: Traceback (most recent call last):
File "/usr/lib64/python3.6/imp.py", line 297, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named \'whiteboard\'\n\n'
Effectively, this means when running this test, on Python 3, on the
parallel mode, the change of directory implemented there
(on selftests/checkall) will make Python 3 fail to find this module,
and the test will fail.
This makes the reference to the module path absolute, so no matter
where this test is run from, it should be able to find the module.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
Showing
想要评论请 注册 或 登录