annotate tests/doctest.txt @ 7:111ffe84f66a

more stubbing
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 08 Jul 2011 10:59:25 -0700
parents 7ea2b5f12b2d
children 5905459d4ebe
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
7ea2b5f12b2d stub tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
1 Test carton
7ea2b5f12b2d stub tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
2 ===========
7ea2b5f12b2d stub tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
3
7ea2b5f12b2d stub tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
4 The obligatory imports:
7ea2b5f12b2d stub tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
5
7ea2b5f12b2d stub tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
6 >>> import carton
7
111ffe84f66a more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 5
diff changeset
7
111ffe84f66a more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 5
diff changeset
8 Make a temporary directory::
111ffe84f66a more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 5
diff changeset
9
5
7ea2b5f12b2d stub tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
10 >>> import tempfile
7
111ffe84f66a more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 5
diff changeset
11 >>> directory = tempfile.mkdtemp()
5
7ea2b5f12b2d stub tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
12
7ea2b5f12b2d stub tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
13 Run some tests::
7ea2b5f12b2d stub tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
14
7
111ffe84f66a more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 5
diff changeset
15 >>> 1 == 1
111ffe84f66a more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 5
diff changeset
16 True
5
7ea2b5f12b2d stub tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
17
7
111ffe84f66a more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 5
diff changeset
18 Clean up::
111ffe84f66a more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 5
diff changeset
19
111ffe84f66a more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 5
diff changeset
20 >>> import shutil
111ffe84f66a more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 5
diff changeset
21 >>> shutil.rmtree(directory)