Mercurial > hg > PaInt
annotate 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 |
rev | line source |
---|---|
74
84890934af1f
start tests for third-party sanity check; first up setup() -> metadata conversion
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
1 Sanity Check |
84890934af1f
start tests for third-party sanity check; first up setup() -> metadata conversion
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
2 ============ |
84890934af1f
start tests for third-party sanity check; first up setup() -> metadata conversion
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
3 |
84890934af1f
start tests for third-party sanity check; first up setup() -> metadata conversion
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
4 Imports:: |
84890934af1f
start tests for third-party sanity check; first up setup() -> metadata conversion
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
5 |
84890934af1f
start tests for third-party sanity check; first up setup() -> metadata conversion
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
6 >>> import pkginfo |
84890934af1f
start tests for third-party sanity check; first up setup() -> metadata conversion
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
7 >>> from distutils.dist import Distribution |
84890934af1f
start tests for third-party sanity check; first up setup() -> metadata conversion
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
8 >>> from StringIO import StringIO |
84890934af1f
start tests for third-party sanity check; first up setup() -> metadata conversion
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
9 |
84890934af1f
start tests for third-party sanity check; first up setup() -> metadata conversion
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
10 Representative metadata:: |
84890934af1f
start tests for third-party sanity check; first up setup() -> metadata conversion
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
11 |
84890934af1f
start tests for third-party sanity check; first up setup() -> metadata conversion
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
12 >>> attrs = dict(name='name', version='0.0', description='description') |
84890934af1f
start tests for third-party sanity check; first up setup() -> metadata conversion
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
13 |
84890934af1f
start tests for third-party sanity check; first up setup() -> metadata conversion
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
14 Make a distribution:: |
84890934af1f
start tests for third-party sanity check; first up setup() -> metadata conversion
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
15 |
84890934af1f
start tests for third-party sanity check; first up setup() -> metadata conversion
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
16 >>> distribution = Distribution(attrs) |
84890934af1f
start tests for third-party sanity check; first up setup() -> metadata conversion
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
17 >>> buffer = StringIO() |
84890934af1f
start tests for third-party sanity check; first up setup() -> metadata conversion
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
18 >>> distribution.metadata.write_pkg_file(buffer) |
84890934af1f
start tests for third-party sanity check; first up setup() -> metadata conversion
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
19 >>> pkginfo_dist = pkginfo.Distribution() |