Autopilot API Documentation

Autopilot Utility Modules

testcase Module

class autopilot.testcase.AutopilotTestCase(*args, **kwargs)[source]

Wrapper around testtools.TestCase that adds significant functionality.

This class should be the base class for all autopilot test case classes. Not using this class as the base class disables several important convenience methods, and also prevents the use of the failed-test recording tools.

Some of the more notable features of this class include:

Application Launch Support

This class contains the methods start_app and start_app_window which will launch one of the well-known applications and return a BamfApplication or BamfWindow instance to the launched process respectively. All applications launched in this way will be closed when the test ends.

Set Unity & Compiz Options

The set_unity_option and set_compiz_option methods set a unity or compiz setting to a particular value for the duration of the current test only. This is useful if you want the window manager to behave in a particular fashion for a particular test, while being assured that any chances are non-destructive.

Patch Process Environment

The patch_environment method patches the process environment, for the duration of the current test only. This allows you to set an environment variable for the duration of the current test only.

call_gsettings_cmd(command, schema, *args)[source]

Set a desktop wide gsettings option

Using the gsettings command because there is a bug with importing from gobject introspection and pygtk2 simultaneously, and the Xlib keyboard layout bits are very unwieldy. This seems like the best solution, even a little bit brutish.

set_unity_option(option_name, option_value)[source]

Set an option in the unity compiz plugin options.

Note

The value will be set for the current test only, and automatically undone when the test ends.

Parameters:
  • option_name – The name of the unity option.
  • option_value – The value you want to set.
Raises :

KeyError if the option named does not exist.

set_compiz_option(plugin_name, option_name, option_value)[source]

Set a compiz option for the duration of this test only.

Note

The value will be set for the current test only, and automatically undone when the test ends.

Parameters:
  • plugin_name – The name of the compiz plugin where the option is registered. If the option is not in a plugin, the string “core” should be used as the plugin name.
  • option_name – The name of the unity option.
  • option_value – The value you want to set.
Raises :

KeyError if the option named does not exist.

classmethod register_known_application(name, desktop_file, process_name)[source]

Register an application with autopilot.

After calling this method, you may call start_app or start_app_window with the name parameter to start this application. You need only call this once within a test run - the application will remain registerred until the test run ends.

Parameters:
  • name – The name to be used when launching the application.
  • desktop_file – The filename (without path component) of the desktop file used to launch the application.
  • process_name – The name of the executable process that gets run.
Raises :

KeyError if application has been registered already

classmethod unregister_known_application(name)[source]

Unregister an application with the known_apps dictionary.

Parameters:name – The name to be used when launching the application.
Raises :KeyError if the application has not been registered.
start_app(app_name, files=[], locale=None)[source]

Start one of the known applications, and kill it on tear down.

Warning

This method will clear all instances of this application on tearDown, not just the one opened by this method! We recommend that you use the start_app_window method instead, as it is generally safer.

Parameters:
  • app_name – The application name. This name must either already be registered as one of the built-in applications that are supported by autopilot, or must have been registered using register_known_application beforehand.
  • files – (Optional) A list of paths to open with the given application. Not all applications support opening files in this way.
  • locale – (Optional) The locale will to set when the application is launched. If you want to launch an application without any localisation being applied, set this parameter to ‘C’.
Returns:

A BamfApplication instance.

start_app_window(app_name, files=[], locale=None)[source]

Open a single window for one of the known applications, and close it at the end of the test.

Parameters:
  • app_name – The application name. This name must either already be registered as one of the built-in applications that are supported by autopilot, or must have been registered with register_known_application beforehand.
  • files – (Optional) Should be a list of paths to open with the given application. Not all applications support opening files in this way.
  • locale – (Optional) The locale will to set when the application is launched. If you want to launch an application without any localisation being applied, set this parameter to ‘C’.
Raises :

AssertionError if no window was opened, or more than one window was opened.

Returns:

A BamfWindow instance.

get_open_windows_by_application(app_name)[source]

Get a list of BamfWindow instances for the given application name.

Parameters:app_name – The name of one of the well-known applications.
Returns:A list of BamfWindow instances.
close_all_app(app_name)[source]

Close all instances of the application ‘app_name’.

get_app_instances(app_name)[source]

Get BamfApplication instances for app_name.

app_is_running(app_name)[source]

Return true if an instance of the application is running.

patch_environment(key, value)[source]

Patch the process environment, setting key with value value.

This patches os.environ for the duration of the test only. After calling this method, the following should be True:

os.environ[key] == value

After the test, the patch will be undone (including deleting the key if if didn’t exist before this method was called).

Note

Be aware that patching the environment in this way only affects the current autopilot process, and any processes spawned by autopilot. If you are planing on starting an application from within autopilot and you want this new application to read the patched environment variable, you must patch the environment before launching the new process.

Parameters:
  • key (string) – The name of the key you wish to set. If the key does not already exist in the process environment it will be created (and then deleted when the test ends).
  • value (string) – The value you wish to set.
assertVisibleWindowStack(stack_start)[source]

Check that the visible window stack starts with the windows passed in.

Note

Minimised windows are skipped.

Parameters:stack_start – An iterable of BamfWindow instances.
Raises :AssertionError if the top of the window stack does not match the contents of the stack_start parameter.
assertProperty(obj, **kwargs)[source]

Assert that obj has properties equal to the key/value pairs in kwargs.

This method is intended to be used on objects whose attributes do not have the wait_for method (i.e.- objects that do not come from the autopilot DBus interface).

For example, from within a test, to assert certain properties on a BamfWindow instance:

self.assertProperty(my_window, is_maximized=True)

Note

assertProperties is a synonym for this method.

Parameters:
  • obj – The object to test.
  • kwargs – One or more keyword arguments to match against the attributes of the obj parameter.
Raises :

ValueError if no keyword arguments were given.

Raises :

ValueError if a named attribute is a callable object.

Raises :

AssertionError if any of the attribute/value pairs in kwargs do not match the attributes on the object passed in.

assertProperties(obj, **kwargs)

Assert that obj has properties equal to the key/value pairs in kwargs.

This method is intended to be used on objects whose attributes do not have the wait_for method (i.e.- objects that do not come from the autopilot DBus interface).

For example, from within a test, to assert certain properties on a BamfWindow instance:

self.assertProperty(my_window, is_maximized=True)

Note

assertProperties is a synonym for this method.

Parameters:
  • obj – The object to test.
  • kwargs – One or more keyword arguments to match against the attributes of the obj parameter.
Raises :

ValueError if no keyword arguments were given.

Raises :

ValueError if a named attribute is a callable object.

Raises :

AssertionError if any of the attribute/value pairs in kwargs do not match the attributes on the object passed in.

autopilot.testcase.multiply_scenarios(*scenarios)[source]

Multiply two or more iterables of scenarios.

It is safe to pass scenario generators or iterators.

Returns:A list of compound scenarios: the cross-product of all scenarios, with the names concatenated and the parameters merged together.

keybindings Module

Utility functions to get shortcut keybindings for various parts of Unity.

Inside Autopilot we deal with keybindings by naming them with unique names. For example, instead of hard-coding the fact that ‘Alt+F2’ opens the command lens, we might call:

>>> keybindings.get('lens_reveal/command')
'Alt+F2'
Keybindings come from two different places:
  1. Keybindings from compiz. We can get these if we have the plugin name and setting name.
  2. Elsewhere. Right now we’re hard-coding these in a separate dictionary.
autopilot.keybindings.get(binding_name)[source]

Get a keybinding, given its well-known name.

Parameters:binding_name (string) –
Raises :TypeError if binding_name cannot be found in the bindings dictionaries.
autopilot.keybindings.get_hold_part(binding_name)[source]

Returns the part of a keybinding that must be held permanently.

Use this function to split bindings like “Alt+Tab” into the part that must be held down. See get_tap_part for the part that must be tapped.

Raises :ValueError if the binding specified does not have multiple parts.
autopilot.keybindings.get_tap_part(binding_name)[source]

Returns the part of a keybinding that must be tapped.

Use this function to split bindings like “Alt+Tab” into the part that must be held tapped. See get_hold_part for the part that must be held down.

Raises :ValueError if the binding specified does not have multiple parts.
class autopilot.keybindings.KeybindingsHelper[source]

Bases: object

A helper class that makes it easier to use Unity keybindings.

keybinding(binding_name, delay=None)[source]

Press and release the keybinding with the given name.

If set, the delay parameter will override the default delay set by the keyboard emulator.

keybinding_hold(binding_name)[source]

Hold down the hold-part of a keybinding.

keybinding_release(binding_name)[source]

Release the hold-part of a keybinding.

keybinding_tap(binding_name)[source]

Tap the tap-part of a keybinding.

keybinding_hold_part_then_tap(binding_name)[source]

Emulators Package

input Module

autopilot.emulators.input.get_keyboard(preferred_variant='')[source]

Get an instance of the Keyboard class.

If variant is specified, it should be a string that specifies a backend to use. However, this hint can be ignored - autopilot will prefer to return a keyboard variant other than the one requested, rather than fail to return anything at all.

If autopilot cannot instantate any of the possible backends, a RuntimeError will be raised.

autopilot.emulators.input.get_mouse(preferred_variant='')[source]

Get an instance of the Mouse class.

If variant is specified, it should be a string that specifies a backend to use. However, this hint can be ignored - autopilot will prefer to return a mouse variant other than the one requested, rather than fail to return anything at all.

If autopilot cannot instantate any of the possible backends, a RuntimeError will be raised.

class autopilot.emulators.input.Keyboard[source]

Bases: object

A base class for all keyboard-type devices.

press(keys, delay=0.2)[source]

Send key press events only.

Parameters:keys (string) – Keys you want pressed.

Example:

>>> press('Alt+F2')

presses the ‘Alt’ and ‘F2’ keys.

release(keys, delay=0.2)[source]

Send key release events only.

Parameters:keys (string) – Keys you want released.

Example:

>>> release('Alt+F2')

releases the ‘Alt’ and ‘F2’ keys.

press_and_release(keys, delay=0.2)[source]

Press and release all items in ‘keys’.

This is the same as calling ‘press(keys);release(keys)’.

Parameters:keys (string) – Keys you want pressed and released.

Example:

>>> press_and_release('Alt+F2')

presses both the ‘Alt’ and ‘F2’ keys, and then releases both keys.

type(string, delay=0.1)[source]

Simulate a user typing a string of text.

Note

Only ‘normal’ keys can be typed with this method. Control characters (such as ‘Alt’ will be interpreted as an ‘A’, and ‘l’, and a ‘t’).

static cleanup()[source]

Generate KeyRelease events for any un-released keys.

Important

Ensure you call this at the end of any test to release any keys that were pressed and not released.

class autopilot.emulators.input.Mouse[source]

Bases: object

A base class for all mouse-type classes.

x[source]

Mouse position X coordinate.

y[source]

Mouse position Y coordinate.

press(button=1)[source]

Press mouse button at current mouse location.

release(button=1)[source]

Releases mouse button at current mouse location.

click(button=1, press_duration=0.1)[source]

Click mouse at current location.

move(x, y, animate=True, rate=10, time_between_events=0.01)[source]

Moves mouse to location (x, y).

Callers should avoid specifying the rate or time_between_events parameters unless they need a specific rate of movement.

move_to_object(object_proxy)[source]

Attempts to move the mouse to ‘object_proxy’s centre point.

It does this by looking for several attributes, in order. The first attribute found will be used. The attributes used are (in order):

  • globalRect (x,y,w,h)
  • center_x, center_y
  • x, y, w, h
Raises :ValueError if none of these attributes are found, or if an attribute is of an incorrect type.
position()[source]

Returns the current position of the mouse pointer.

Returns:(x,y) tuple
drag(x1, y1, x2, y2)[source]

Performs a press, move and release This is to keep a common API between Mouse and Finger as long as possible

static cleanup()[source]

Put mouse in a known safe state.

bamf Module

Various classes for interacting with BAMF.

class autopilot.emulators.bamf.Bamf[source]

Bases: object

High-level class for interacting with Bamf from within a test.

Use this class to inspect the state of running applications and open windows.

get_running_applications(user_visible_only=True)[source]

Get a list of the currently running applications.

If user_visible_only is True (the default), only applications visible to the user in the switcher will be returned.

get_running_applications_by_desktop_file(desktop_file)[source]

Return a list of applications that have the desktop file desktop_file.

This method may return an empty list, if no applications are found with the specified desktop file.

get_application_by_xid(xid)[source]

Return the application that has a child with the requested xid or None.

get_open_windows(user_visible_only=True)[source]

Get a list of currently open windows.

If user_visible_only is True (the default), only applications visible to the user in the switcher will be returned.

The result is sorted to be in stacking order.

get_window_by_xid(xid)[source]

Get the BamfWindow that matches the provided xid.

wait_until_application_is_running(desktop_file, timeout)[source]

Wait until a given application is running.

Parameters:
  • desktop_file (string) – The name of the application desktop file.
  • timeout (integer) – The maximum time to wait, in seconds. If set to something less than 0, this method will wait forever.
Returns:

true once the application is found, or false if the application was not found until the timeout was reached.

launch_application(desktop_file, files=[], wait=True)[source]

Launch an application by specifying a desktop file.

Parameters:files (List of strings) – List of files to pass to the application. Not all apps support this.

Note

If wait is True, this method will wait up to 10 seconds for the application to appear in the BAMF model.

Raises :TypeError on invalid files parameter.
Returns:The Gobject process object.
class autopilot.emulators.bamf.BamfApplication(bamf_app_path)[source]

Bases: object

Represents an application, with information as returned by Bamf.

Important

Don’t instantiate this class yourself. instead, use the methods as provided by the Bamf class.

Raises :dbus.DBusException in the case of a DBus error.
desktop_file[source]

Get the application desktop file.

This just returns the filename, not the full path. If the application no longer exists, this returns an empty string.

name[source]

Get the application name.

Note

This may change according to the current locale. If you want a unique string to match applications against, use the desktop_file instead.

icon[source]

Get the application icon.

Returns:The name of the icon.
is_active[source]

Is the application active (i.e.- has keyboard focus)?

is_urgent[source]

Is the application currently signalling urgency?

user_visible[source]

Is this application visible to the user?

Note

Some applications (such as the panel) are hidden to the user but will still be returned by bamf.

get_windows()[source]

Get a list of the application windows.

class autopilot.emulators.bamf.BamfWindow(window_path)[source]

Bases: object

Represents an application window, as returned by Bamf.

Important

Don’t instantiate this class yourself. Instead, use the appropriate methods in BamfApplication.

x_id[source]

Get the X11 Window Id.

x_win[source]

Get the X11 window object of the underlying window.

name[source]

Get the window name.

Note

This may change according to the current locale. If you want a unique string to match windows against, use the x_id instead.

title[source]

Get the window title.

This may be different from the application name.

Note

This may change depending on the current locale.

geometry[source]

Get the geometry for this window.

Returns:Tuple containing (x, y, width, height).
is_maximized[source]

Is the window maximized?

Maximized in this case means both maximized vertically and horizontally. If a window is only maximized in one direction it is not considered maximized.

application[source]

Get the application that owns this window.

This method may return None if the window does not have an associated application. The ‘desktop’ window is one such example.

user_visible[source]

Is this window visible to the user in the switcher?

is_hidden[source]

Is this window hidden?

Windows are hidden when the ‘Show Desktop’ mode is activated.

is_focused[source]

Is this window focused?

is_valid[source]

Is this window object valid?

Invalid windows are caused by windows closing during the construction of this object instance.

monitor[source]

Returns the monitor to which the windows belongs to

closed[source]

Returns True if the window has been closed

close()[source]

Close the window.

set_focus()[source]

ibus Module

Functions to deal with ibus service.

autopilot.emulators.ibus.get_ibus_bus()[source]

Get the ibus bus object, possibly starting the ibus daemon if it’s not already running.

Raises :RuntimeError in the case of ibus-daemon being unavailable.
autopilot.emulators.ibus.get_available_input_engines()[source]

Get a list of available input engines.

autopilot.emulators.ibus.get_active_input_engines()[source]

Get the list of input engines that have been activated.

autopilot.emulators.ibus.set_active_engines(engine_list)[source]

Installs the engines in engine_list into the list of active iBus engines.

The specified engines must appear in the return list from get_available_input_engines().

Note

This function removes all other engines.

This function returns the list of engines installed before this function was called. The caller should pass this list to set_active_engines to restore ibus to it’s old state once the test has finished.

Parameters:engine_list (List of strings) – List of engine names
Raises :TypeError on invalid engine_list parameter.
Raises :ValueError when engine_list contains invalid engine name.
autopilot.emulators.ibus.set_gconf_option(path, value)[source]

Set the gconf setting on path to the defined value

autopilot.emulators.ibus.get_gconf_option(path)[source]

Get the gconf setting on path

zeitgeist Module

Provide ability to register text files with the file lens.

class autopilot.emulators.zeitgeist.Zeitgeist[source]

Bases: object

Provide access zeitgeist.

add_existing_file(path)[source]

Registers file with zeitgeist.

Parameters:file (string) – full path to an existing text file to register.
Raises :RuntimeError if file does not exist.

Introspection Package

introspection Package

Package for introspection support.

class autopilot.introspection.ApplicationIntrospectionTestMixin[source]

Bases: object

A mix-in class to make launching applications for introsection easier.

Important

You should not instantiate this class directly. Instead, use one of the derived classes.

launch_test_application(application, *arguments, **kwargs)[source]

Launch application and retrieve a proxy object for the application.

Use this method to launch a supported application and start testing it. The application can be specified as:

  • A Desktop file, either with or without a path component.
  • An executable file, either with a path, or one that is in the $PATH.

This method supports the following keyword arguments:

  • launch_dir. If set to a directory that exists the process will be launched from that directory.
  • capture_output. If set to True (the default), the process output will be captured and attached to the test as test detail.
Raises :ValueError if unknown keyword arguments are passed.
Returns:A proxy object that represents the application. Introspection data is retrievable via this object.
prepare_environment(app_path, arguments)[source]

Prepare the application, or environment to launch with autopilot-support.

This method does nothing - it exists so child classes can override it.

The method must return a tuple of (app_path, arguments). Either of these can be altered by this method.

autopilot.introspection.launch_autopilot_enabled_process(application, args, capture_output, **kwargs)[source]

Launch an autopilot-enabled process and return the proxy object.

autopilot.introspection.get_child_pids(pid)[source]

Get a list of all child process Ids, for the given parent.

autopilot.introspection.get_autopilot_proxy_object_for_process(process)[source]

Return the autopilot proxy object for the given process.

Raises :RuntimeError if no autopilot interface was found.
autopilot.introspection.make_proxy_object_from_service_name(service_name, obj_path)[source]

Returns a root proxy object given a DBus service name.

autopilot.introspection.get_proxy_object_base_clases(service_name, obj_path)[source]

Return tuple of the base classes to use when creating a proxy object for the given service name & path.

Raises :RuntimeError if the autopilot interface cannot be found.
autopilot.introspection.get_proxy_object_class_name_and_state(service_name, obj_path)[source]

Return the class name and root state dictionary.

class autopilot.introspection.ApplicationProxyObect(state, path_info=None)[source]

Bases: autopilot.introspection.dbus.DBusIntrospectionObject

A class that better supports query data from an application.

select_single(type_name='*', **kwargs)[source]

Get a single node from the introspection tree, with type equal to type_name and (optionally) matching the keyword filters present in kwargs.

For example:

>>> app.select_single('QPushButton', objectName='clickme')
... returns a QPushButton whose 'objectName' property is 'clickme'.

If nothing is returned from the query, this method returns None.

Raises :ValueError if the query returns more than one item. If you want more than one item, use select_many instead.
select_many(type_name='*', **kwargs)[source]

Get a list of nodes from the introspection tree, with type equal to type_name and (optionally) matching the keyword filters present in kwargs.

For example:

>>> app.select_many('QPushButton', enabled=True)
... returns a list of QPushButtons that are enabled.

If you only want to get one item, use select_single instead.

set_process(process)[source]

Set the subprocess.Popen object of the process that this is a proxy for.

You should never normally need to call this method.

pid[source]
process[source]
kill_application()[source]

Kill the running process that this is a proxy for using ‘kill pid‘.

dbus Module

This module contains the code to retrieve state via DBus calls.

Under normal circumstances, the only thing you should need to use from this module is the DBusIntrospectableObject class.

exception autopilot.introspection.dbus.StateNotFoundError(class_name, class_id)[source]

Bases: exceptions.RuntimeError

Raised when a piece of state information from unity is not found.

message = "State not found for class with name '{}' and id '{}'."
class autopilot.introspection.dbus.IntrospectableObjectMetaclass[source]

Bases: type

Metaclass to insert appropriate classes into the object registry.

autopilot.introspection.dbus.clear_object_registry()[source]

Clear the object registry.

Important

DO NOT CALL THIS UNLESS YOU REALLY KNOW WHAT YOU ARE DOING! ... and even then, are you sure?

autopilot.introspection.dbus.get_introspection_iface(service_name, object_path)[source]

Get the autopilot introspection interface for the specified service name and object path.

Parameters:
  • service_name (string) –
  • object_name (string) –
Raises :

TypeError on invalid parameter type

autopilot.introspection.dbus.translate_state_keys(state_dict)[source]

Translates the state_dict passed in so the keys are usable as python attributes.

autopilot.introspection.dbus.object_passes_filters(instance, **kwargs)[source]

Return true if instance satisifies all the filters present in kwargs.

class autopilot.introspection.dbus.DBusIntrospectionObject(state_dict, path_info=None)[source]

Bases: object

A class that can be created using a dictionary of state from DBus.

To use this class properly you must set the DBUS_SERVICE and DBUS_OBJECT class attributes. They should be set to the Service name and object path where the autopilot interface is being exposed.

DBUS_SERVICE = None
DBUS_OBJECT = None
set_properties(state_dict)[source]

Creates and set attributes of self based on contents of state_dict.

Note

Translates ‘-‘ to ‘_’, so a key of ‘icon-type’ for example becomes ‘icon_type’.

get_children_by_type(desired_type, **kwargs)[source]

Get a list of children of the specified type.

Keyword arguments can be used to restrict returned instances. For example:

>>> get_children_by_type(Launcher, monitor=1)

will return only LauncherInstances that have an attribute ‘monitor’ that is equal to 1. The type can also be specified as a string, which is useful if there is no emulator class specified:

>>> get_children_by_type('Launcher', monitor=1)

Note however that if you pass a string, and there is an emulator class defined, autopilot will not use it.

Parameters:desired_type (subclass of DBusIntrospectionObject, or a string.) –

Important

desired_type must be a subclass of DBusIntrospectionObject.

get_properties()[source]

Returns a dictionary of all the properties on this class.

get_children()[source]

Returns a list of all child objects.

refresh_state()[source]

Refreshes the object’s state from unity.

Raises :StateNotFound if the object in unity has been destroyed.
classmethod get_all_instances()[source]

Get all instances of this class that exist within the Unity state tree.

For example, to get all the BamfLauncherIcons:

>>> icons = BamfLauncherIcons.get_all_instances()
Returns:List (possibly empty) of class instances.

WARNING: Using this method is slow - it requires a complete scan of the introspection tree. Instead, get the root tree object with get_root_instance, and then navigate to the desired node.

classmethod get_root_instance()[source]

Get the object at the root of this tree.

classmethod get_state_by_path(piece)[source]

Get state for a particular piece of the state tree.

piece is an XPath-like query that specifies which bit of the tree you want to look at.

Parameters:piece (string) –
Raises :TypeError on invalid piece parameter.
get_new_state()[source]

Retrieve a new state dictionary for this class instance.

Note

The state keys in the returned dictionary are not translated.

get_class_query_string()[source]

Get the XPath query string required to refresh this class’s state.

classmethod make_introspection_object(dbus_tuple, path_info=None)[source]

Make an introspection object given a DBus tuple of (name, state_dict).

The optional ‘path_info’ parameter can be set to a string that contains the full, absolute path in the introspection tree to this object.

This only works for classes that derive from DBusIntrospectionObject.

no_automatic_refreshing(*args, **kwds)[source]

Context manager function to disable automatic DBus refreshing when retrieving attributes.

Example usage:

>>> with instance.no_automatic_refreshing():
    # access lots of attributes.

qt Module

Classes and tools to support Qt introspection.

class autopilot.introspection.qt.QtIntrospectionTestMixin[source]

Bases: autopilot.introspection.ApplicationIntrospectionTestMixin

A mix-in class to make Qt application introspection easier.

Inherit from this class if you want to launch and test Qt application with autopilot.

prepare_environment(app_path, arguments)[source]

Prepare the application, or environment to launch with autopilot-support.

gtk Module

class autopilot.introspection.gtk.GtkIntrospectionTestMixin[source]

Bases: autopilot.introspection.ApplicationIntrospectionTestMixin

A mix-in class to make Gtk application introspection easier.

prepare_environment(app_path, arguments)[source]

Prepare the application, or environment to launch with autopilot-support.

Matchers Package

matchers Package

Autopilot-specific testtools matchers.

class autopilot.matchers.Eventually(matcher, **kwargs)[source]

Bases: testtools.matchers._impl.Matcher

Asserts that a value will eventually equal a given Matcher object.

This works on objects that either have a wait_for(expected) function, or objects that are callable and return the most current value (i.e.- they refresh the objects value).

match(value)[source]