Mercurial > hg > simpypi
comparison tests/doctest.txt @ 53:a40f050812cb
start inspecting archive contents
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Thu, 01 Mar 2012 14:48:39 -0800 |
parents | 59368c0bbd8d |
children | 73e6956c670a |
comparison
equal
deleted
inserted
replaced
52:59368c0bbd8d | 53:a40f050812cb |
---|---|
50 | 50 |
51 Install the package and inspect the installation:: | 51 Install the package and inspect the installation:: |
52 | 52 |
53 >>> tmpdir = tempfile.mkdtemp() | 53 >>> tmpdir = tempfile.mkdtemp() |
54 >>> archive = tarfile.TarFile.open(path) | 54 >>> archive = tarfile.TarFile.open(path) |
55 >>> for member in archive.getmembers(): | |
56 ... archive.extract(member, path=tmpdir) | |
57 >>> os.listdir(tmpdir) | |
58 ['HelloWorld-0.0'] | |
59 >>> srcdir = os.path.join(tmpdir, 'HelloWorld-0.0') | |
60 >>> os.path.exists(os.path.join(srcdir, 'setup.py')) | |
61 True | |
55 >>> shutil.rmtree(tmpdir) | 62 >>> shutil.rmtree(tmpdir) |
56 | 63 |
57 Upload the same package but with the wrong name:: | 64 Upload the same package but with the wrong name:: |
58 | 65 |
59 >>> shutil.rmtree(os.path.join(directory, 'HelloWorld')) | 66 >>> shutil.rmtree(os.path.join(directory, 'HelloWorld')) |