view tests/doctest.txt @ 59:acee5e882768

the egg-info tests fail. yay!
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 25 Jan 2013 07:12:33 -0800
parents d5e5c7496784
children 1234bfb1f1f0
line wrap: on
line source

Test PaInt
==========

The obligatory imports::

    >>> import os
    >>> import paint

Get the dependencies of a package::

    >>> jetperf = paint.Package('http://k0s.org/mozilla/hg/jetperf/archive/tip.tar.gz', verbose=False)
    >>> dependencies = jetperf.dependencies()
    >>> dependencies == {'mozharness': 'http://hg.mozilla.org/build/mozharness/archive/tip.tar.gz#egg=mozharness', 'talos': 'http://hg.mozilla.org/build/talos/archive/tip.tar.gz#egg=talos'}
    True
    >>> jetperf._cleanup()

Test different ways of getting package information.  First we'll use
an interface that overrides ``setuptools.setup``::

    >>> import paint.info
    >>> dummy_path = os.path.join(here, 'dummy')
    >>> package_info = paint.info.SetupOverridePackageInfo(dummy_path)
    >>> info = package_info()
    >>> info['name']
    'dummy'

Now let's use the .egg-info way::

    >>> package_info = paint.info.EggInfo(dummy_path)
    >>> info = package_info()
    >>> info['name']
    'dummy'