Mercurial > hg > simpypi
comparison tests/doctest.txt @ 52:59368c0bbd8d
* addition sdist tests
* stub extracting the tarball
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Thu, 01 Mar 2012 14:44:16 -0800 |
parents | 6a8071eab89e |
children | a40f050812cb |
comparison
equal
deleted
inserted
replaced
51:6a8071eab89e | 52:59368c0bbd8d |
---|---|
5 | 5 |
6 >>> import os | 6 >>> import os |
7 >>> import pkginfo | 7 >>> import pkginfo |
8 >>> import shutil | 8 >>> import shutil |
9 >>> import simpypi | 9 >>> import simpypi |
10 >>> import tarfile | |
10 >>> import tempfile | 11 >>> import tempfile |
11 >>> from paste.fixture import TestApp | 12 >>> from paste.fixture import TestApp |
12 | 13 |
13 The directory is initially empty:: | 14 The directory is initially empty:: |
14 | 15 |
40 >>> sdist = pkginfo.sdist.SDist(path) | 41 >>> sdist = pkginfo.sdist.SDist(path) |
41 >>> sdist.name | 42 >>> sdist.name |
42 'HelloWorld' | 43 'HelloWorld' |
43 >>> sdist.version | 44 >>> sdist.version |
44 '0.0' | 45 '0.0' |
46 >>> sdist.home_page | |
47 'http://helloworld.example.com/' | |
48 >>> sdist.author | |
49 'Jeff Hammel' | |
45 | 50 |
46 Install the package and inspect the installation:: | 51 Install the package and inspect the installation:: |
47 | 52 |
48 >>> tmpdir = tempfile.mkdtemp() | 53 >>> tmpdir = tempfile.mkdtemp() |
54 >>> archive = tarfile.TarFile.open(path) | |
49 >>> shutil.rmtree(tmpdir) | 55 >>> shutil.rmtree(tmpdir) |
50 | 56 |
51 Upload the same package but with the wrong name:: | 57 Upload the same package but with the wrong name:: |
52 | 58 |
53 >>> shutil.rmtree(os.path.join(directory, 'HelloWorld')) | 59 >>> shutil.rmtree(os.path.join(directory, 'HelloWorld')) |