Public bug reported:

I can't run a particular AutoPilot test case that, it turns out, runs
with autopilot3 just fine:

adb shell
> autopilot3 run 
> ubuntuuitoolkit.tests.test_launcher.LauncherQtTestTestCase.test_can_run_qt_test_case
>  -v

Ran 1 test in 2.504s
OK

^^ Works

$ phablet-test-run ubuntuuitoolkit.tests.test_launcher
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/autopilot/run.py", line 380, in 
_discover_test
top_level_dir=top_level_dir
File "/usr/lib/python3.4/unittest/loader.py", line 261, in discover
raise ImportError('Start directory is not importable: %r' % start_dir)
ImportError: Start directory is not importable: 
'ubuntuuitoolkit.tests.test_launcher'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/bin/autopilot3", line 9, in <module>
load_entry_point('autopilot==1.5.0', 'console_scripts', 'autopilot3')()
File "/usr/lib/python3/dist-packages/autopilot/run.py", line 742, in main
test_app.run()
File "/usr/lib/python3/dist-packages/autopilot/run.py", line 628, in run
action()
File "/usr/lib/python3/dist-packages/autopilot/run.py", line 666, in run_tests
self.args.suite
File "/usr/lib/python3/dist-packages/autopilot/run.py", line 470, in 
load_test_suite_from_name
all_tests, error_occured = _discover_requested_tests(test_names)
File "/usr/lib/python3/dist-packages/autopilot/run.py", line 402, in 
_discover_requested_tests
test, top_level_dir = _discover_test(name)
File "/usr/lib/python3/dist-packages/autopilot/run.py", line 384, in 
_discover_test
test = loader.loadTestsFromName(test_name)
File "/usr/lib/python3.4/unittest/loader.py", line 114, in loadTestsFromName
parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'test_launcher'
/usr/bin/phablet-test-run: 128: return: Illegal number: 1

adb shell
> ls /usr/lib/python3/dist-packages/ubuntuuitoolkit/tests
/usr/lib/python3/dist-packages/ubuntuuitoolkit/tests/test_launcher.py
/usr/lib/python3/dist-packages/ubuntuuitoolkit/tests/test_launcher.testcase.qml
/usr/lib/python3/dist-packages/ubuntuuitoolkit/tests/test_launcher.touch.qml

phablet-test-run 
ubuntuuitoolkit.tests.test_launcher.LauncherQtTestTestCase.test_can_run_qt_test_case
 -v
09:46:50.241 INFO run:235 - Autopilot Source Version: 1.5.0
Autopilot Package Version: 1.5.0+15.04.20141031-0ubuntu1
09:46:50.312 WARNING emulators:26 - The ubuntuuitoolkit.emulators module is 
deprecated. Import the autopilot helpers from the top-level ubuntuuitoolkit 
module.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/autopilot/run.py", line 380, in 
_discover_test
top_level_dir=top_level_dir
File "/usr/lib/python3.4/unittest/loader.py", line 261, in discover
raise ImportError('Start directory is not importable: %r' % start_dir)
ImportError: Start directory is not importable: 
'ubuntuuitoolkit.tests.test_launcher.LauncherQtTestTestCase.test_can_run_qt_test_case'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/bin/autopilot3", line 9, in <module>
load_entry_point('autopilot==1.5.0', 'console_scripts', 'autopilot3')()
File "/usr/lib/python3/dist-packages/autopilot/run.py", line 742, in main
test_app.run()
File "/usr/lib/python3/dist-packages/autopilot/run.py", line 628, in run
action()
File "/usr/lib/python3/dist-packages/autopilot/run.py", line 666, in run_tests
self.args.suite
File "/usr/lib/python3/dist-packages/autopilot/run.py", line 470, in 
load_test_suite_from_name
all_tests, error_occured = _discover_requested_tests(test_names)
File "/usr/lib/python3/dist-packages/autopilot/run.py", line 402, in 
_discover_requested_tests
test, top_level_dir = _discover_test(name)
File "/usr/lib/python3/dist-packages/autopilot/run.py", line 384, in 
_discover_test
test = loader.loadTestsFromName(test_name)
File "/usr/lib/python3.4/unittest/loader.py", line 114, in loadTestsFromName
parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'test_launcher'
/usr/bin/phablet-test-run: 128: return: Illegal number: 1

^^ Fails


Code is in lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/autoPilotQtTestLanding

** Affects: phablet-tools (Ubuntu)
     Importance: Critical
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1394932

Title:
  ImportError: Start directory is not importable on valid test folder

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/phablet-tools/+bug/1394932/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to