The slash at the end of the directory/package name will cause execution failure
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Autopilot |
Fix Released
|
Low
|
Max Brustkern | ||
autopilot (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Autopilot take the name of a directory as its second argument but does not allow for trailing slashes. This happens when the Tab key is used to autocomplete the directoy name.
e.g. autopilot run stock_ticker/ <-- broken
autopilot run stock_ticker <-- works
Traceback (most recent call last):
File "/usr/bin/
main()
File "/usr/bin/
run_tests(args)
File "/usr/bin/
test_suite = load_test_
File "/usr/bin/
package = __import_
ImportError: Import by filename is not supported.
Related branches
- PS Jenkins bot: Needs Fixing (continuous-integration)
- Thomi Richards (community): Approve
-
Diff: 139 lines (+43/-16)2 files modifiedautopilot/__init__.py (+4/-0)
autopilot/tests/unit/test_command_line_args.py (+39/-16)
Changed in autopilot: | |
status: | Triaged → In Progress |
assignee: | nobody → Max Brustkern (nuclearbob) |
Changed in autopilot: | |
status: | In Progress → Fix Released |
Hi Robert,
The argument you pass to autopilot is, in fact, a python module, NOT a directory. For example, this is perfectly valid:
autopilot run unity.tests.dash
Having said that, we can make autopilot understand that it should ignore a single trailing slash. Patches welcome!