Mercurial > mozilla > hg > licenser
annotate tests/doctest.txt @ 20:272e10163900
minor fixes
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Thu, 24 Nov 2011 15:01:16 -0800 |
parents | c04a53145f19 |
children | 80193ae99aaf |
rev | line source |
---|---|
8 | 1 Test licenser |
2 ================ | |
3 | |
15 | 4 The obligatory imports:: |
8 | 5 |
6 >>> import licenser | |
18
c04a53145f19
interpolate the files, i hope
Jeff Hammel <jhammel@mozilla.com>
parents:
15
diff
changeset
|
7 >>> from licenser import licenses |
15 | 8 >>> import os |
8 | 9 |
18
c04a53145f19
interpolate the files, i hope
Jeff Hammel <jhammel@mozilla.com>
parents:
15
diff
changeset
|
10 Sanity check:: |
8 | 11 |
15 | 12 >>> assert os.path.exists(directory) |
13 | |
18
c04a53145f19
interpolate the files, i hope
Jeff Hammel <jhammel@mozilla.com>
parents:
15
diff
changeset
|
14 Test MPL license:: |
c04a53145f19
interpolate the files, i hope
Jeff Hammel <jhammel@mozilla.com>
parents:
15
diff
changeset
|
15 |
c04a53145f19
interpolate the files, i hope
Jeff Hammel <jhammel@mozilla.com>
parents:
15
diff
changeset
|
16 >>> license = licenses.MPL() |
c04a53145f19
interpolate the files, i hope
Jeff Hammel <jhammel@mozilla.com>
parents:
15
diff
changeset
|
17 >>> variables = {'author': 'Jeff Hammel', 'email': 'k0s@k0s.org'} |
c04a53145f19
interpolate the files, i hope
Jeff Hammel <jhammel@mozilla.com>
parents:
15
diff
changeset
|
18 >>> license.interpolate(directory, variables) |