Mercurial > hg > PaInt
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 73:5b10f2c03cb9 | 74:84890934af1f |
|---|---|
| 1 Sanity Check | |
| 2 ============ | |
| 3 | |
| 4 Imports:: | |
| 5 | |
| 6 >>> import pkginfo | |
| 7 >>> from distutils.dist import Distribution | |
| 8 >>> from StringIO import StringIO | |
| 9 | |
| 10 Representative metadata:: | |
| 11 | |
| 12 >>> attrs = dict(name='name', version='0.0', description='description') | |
| 13 | |
| 14 Make a distribution:: | |
| 15 | |
| 16 >>> distribution = Distribution(attrs) | |
| 17 >>> buffer = StringIO() | |
| 18 >>> distribution.metadata.write_pkg_file(buffer) | |
| 19 >>> pkginfo_dist = pkginfo.Distribution() |
