The slash at the end of the directory/package name will cause execution failure

Bug #1199088 reported by Robert Steckroth
12
This bug affects 2 people
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/autopilot", line 328, in <module>
    main()
  File "/usr/bin/autopilot", line 319, in main
    run_tests(args)
  File "/usr/bin/autopilot", line 85, in run_tests
    test_suite = load_test_suite_from_name(args.suite)
  File "/usr/bin/autopilot", line 213, in load_test_suite_from_name
    package = __import__(top_level_pkg)
ImportError: Import by filename is not supported.

Related branches

Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

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!

Changed in autopilot:
status: New → Triaged
importance: Undecided → Low
Changed in autopilot:
status: Triaged → In Progress
assignee: nobody → Max Brustkern (nuclearbob)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autopilot - 1.4+14.04.20140219-0ubuntu1

---------------
autopilot (1.4+14.04.20140219-0ubuntu1) trusty; urgency=low

  [ Thomi Richards ]
  * Vis tool improvements for self-testing: Added ability for vis tool
    to be run with testability enabled, and able to be profiled. (LP:
    #1279944)
  * Add a decorator that makes it easy to write compatible __repr__
    functions in both python 2.x and 3.x.

  [ Leo Arias ]
  * Refactor the _uinput module to avoid side-effects when we import it.
  * Added Mouse, Touch and Pointer drags with rate. (LP: #1257055)

  [ Max Brustkern ]
  * Handle trailing slashes on suites. (LP: #1199088)

  [ Christopher Lee ]
  * Fix import error in functional test
    test_bamf_geometry_gives_reliable_results. (LP: #1281253)

  [ CI bot ]
  * Fix test_command_line_args issues with python 3.4. (LP: #1281733)
 -- Ubuntu daily release <email address hidden> Wed, 19 Feb 2014 21:41:38 +0000

Changed in autopilot (Ubuntu):
status: New → Fix Released
Changed in autopilot:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.