Mercurial > hg > simpypi
annotate tests/doctest.txt @ 33:058182b7b309
note test-requires.txt in the readme
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Wed, 29 Feb 2012 20:32:26 -0800 |
parents | 15c7171941ea |
children | a02d08627d9c |
rev | line source |
---|---|
7 | 1 Test simpypi |
2 ============ | |
6 | 3 |
4 The obligatory imports:: | |
5 | |
33
058182b7b309
note test-requires.txt in the readme
Jeff Hammel <jhammel@mozilla.com>
parents:
8
diff
changeset
|
6 >>> import os |
6 | 7 >>> import simpypi |
33
058182b7b309
note test-requires.txt in the readme
Jeff Hammel <jhammel@mozilla.com>
parents:
8
diff
changeset
|
8 >>> from paste.fixture import TestApp |
6 | 9 |
33
058182b7b309
note test-requires.txt in the readme
Jeff Hammel <jhammel@mozilla.com>
parents:
8
diff
changeset
|
10 The directory is initially empty:: |
058182b7b309
note test-requires.txt in the readme
Jeff Hammel <jhammel@mozilla.com>
parents:
8
diff
changeset
|
11 |
058182b7b309
note test-requires.txt in the readme
Jeff Hammel <jhammel@mozilla.com>
parents:
8
diff
changeset
|
12 >>> os.listdir(directory) |
058182b7b309
note test-requires.txt in the readme
Jeff Hammel <jhammel@mozilla.com>
parents:
8
diff
changeset
|
13 [] |
058182b7b309
note test-requires.txt in the readme
Jeff Hammel <jhammel@mozilla.com>
parents:
8
diff
changeset
|
14 |
058182b7b309
note test-requires.txt in the readme
Jeff Hammel <jhammel@mozilla.com>
parents:
8
diff
changeset
|
15 Make a test application:: |
058182b7b309
note test-requires.txt in the readme
Jeff Hammel <jhammel@mozilla.com>
parents:
8
diff
changeset
|
16 |
058182b7b309
note test-requires.txt in the readme
Jeff Hammel <jhammel@mozilla.com>
parents:
8
diff
changeset
|
17 >>> app = simpypi.SimPyPI(directory) |
058182b7b309
note test-requires.txt in the readme
Jeff Hammel <jhammel@mozilla.com>
parents:
8
diff
changeset
|
18 >>> testapp = TestApp(app) |