Mercurial > hg > simpypi
comparison tests/test_ttw.txt @ 66:a2ba66be2e31
tests mysteriously fail now
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Thu, 01 Mar 2012 19:36:02 -0800 |
parents | 83327bc715be |
children | cf03c3f2f98e |
comparison
equal
deleted
inserted
replaced
65:83327bc715be | 66:a2ba66be2e31 |
---|---|
4 Test ``simpypi`` through the web with a test server. | 4 Test ``simpypi`` through the web with a test server. |
5 | 5 |
6 The obligatory imports:: | 6 The obligatory imports:: |
7 | 7 |
8 >>> import os | 8 >>> import os |
9 >>> import shutil | |
10 >>> import subprocess | |
11 >>> import tempfile | |
9 >>> import urllib2 | 12 >>> import urllib2 |
10 >>> from simpypi.factory import factory | 13 >>> from simpypi.factory import factory |
11 | 14 |
12 Create a WSGI app:: | 15 Create a WSGI app:: |
13 | 16 |
52 >>> os.listdir(directory) | 55 >>> os.listdir(directory) |
53 ['HelloWorld'] | 56 ['HelloWorld'] |
54 >>> os.listdir(os.path.join(directory, 'HelloWorld')) | 57 >>> os.listdir(os.path.join(directory, 'HelloWorld')) |
55 ['HelloWorld-0.0.tar.gz'] | 58 ['HelloWorld-0.0.tar.gz'] |
56 | 59 |
60 Make a virtualenv to install it in:: | |
61 | |
62 >>> tmpdir = tempfile.mkdtemp() | |
63 >>> venv = create_virtualenv(tmpdir) | |
64 >>> shutil.rmtree(tmpdir) | |
65 | |
57 Shut down the server:: | 66 Shut down the server:: |
58 | 67 |
59 >>> server.stop() | 68 >>> server.stop() |