Mercurial > hg > simpypi
comparison tests/doctest.txt @ 51:6a8071eab89e
add in smokescreen pkginfo tests
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Thu, 01 Mar 2012 14:33:50 -0800 |
parents | e4a97d6f2811 |
children | 59368c0bbd8d |
comparison
equal
deleted
inserted
replaced
50:e4a97d6f2811 | 51:6a8071eab89e |
---|---|
2 ============ | 2 ============ |
3 | 3 |
4 The obligatory imports:: | 4 The obligatory imports:: |
5 | 5 |
6 >>> import os | 6 >>> import os |
7 >>> import pkginfo | |
7 >>> import shutil | 8 >>> import shutil |
8 >>> import simpypi | 9 >>> import simpypi |
9 >>> import tempfile | 10 >>> import tempfile |
10 >>> from paste.fixture import TestApp | 11 >>> from paste.fixture import TestApp |
11 | 12 |
33 >>> os.listdir(os.path.join(directory, 'HelloWorld')) | 34 >>> os.listdir(os.path.join(directory, 'HelloWorld')) |
34 ['HelloWorld-0.0.tar.gz'] | 35 ['HelloWorld-0.0.tar.gz'] |
35 | 36 |
36 Ensure the package is what you expect it to be:: | 37 Ensure the package is what you expect it to be:: |
37 | 38 |
39 >>> path = os.path.join(directory, 'HelloWorld', 'HelloWorld-0.0.tar.gz') | |
40 >>> sdist = pkginfo.sdist.SDist(path) | |
41 >>> sdist.name | |
42 'HelloWorld' | |
43 >>> sdist.version | |
44 '0.0' | |
45 | |
46 Install the package and inspect the installation:: | |
47 | |
38 >>> tmpdir = tempfile.mkdtemp() | 48 >>> tmpdir = tempfile.mkdtemp() |
39 >>> shutil.rmtree(tmpdir) | 49 >>> shutil.rmtree(tmpdir) |
40 | 50 |
41 Upload the same package but with the wrong name:: | 51 Upload the same package but with the wrong name:: |
42 | 52 |