A few integration tests we can run to test things on a higher level.
These will probably require root or access to specific block devices so
they are not meant to be automated.

    # This should print nothing to stdout but will unpack the given binary
    # tarball under the given directory.
    >>> from linaro_image_tools.media_create.unpack_binary_tarball import unpack_binary_tarball
    >>> unpack_binary_tarball(<path-to-binary-tarball>, <dir-to-unpack>)

    # Partition (for real!) /dev/sdb for a beagle board and return the devices
    # for the boot and root partitions.
    >>> from linaro_image_tools.media_create.partitions import Media, setup_partitions
    >>> from linaro_image_tools.media_create.boards import board_configs
    >>> setup_partitions(
    ...     board_configs['beagle'], Media('/dev/sdb'), None, 'boot',
    ...     'root', 'ext3', True, True, True)
    Checking that no-one is using this disk right now
    ...
    ('/dev/sdb1', '/dev/sdb2')

    # Partition /tmp/beagle.img for a beagle board and return the loopback
    # devices for the boot and root partitions.
    >>> setup_partitions(
    ...     board_configs['beagle'], Media('/tmp/beagle.img'), '2G', 'boot',
    ...     'root', 'ext3', True, True, True)
    Warning: /tmp/beagle.img is not a block device
    ...
    ('/dev/loop0', '/dev/loop1')
