view tests/sanity.txt @ 74:84890934af1f

start tests for third-party sanity check; first up setup() -> metadata conversion
author Jeff Hammel <jhammel@mozilla.com>
date Sun, 27 Jan 2013 19:03:42 -0800
parents
children 0f62570e80f3
line wrap: on
line source

Sanity Check
============

Imports::

    >>> import pkginfo
    >>> from distutils.dist import Distribution
    >>> from StringIO import StringIO

Representative metadata::

    >>> attrs = dict(name='name', version='0.0', description='description')

Make a distribution::

    >>> distribution = Distribution(attrs)
    >>> buffer = StringIO()
    >>> distribution.metadata.write_pkg_file(buffer)
    >>> pkginfo_dist = pkginfo.Distribution()