Mercurial > mozilla > hg > licenser
annotate tests/doctest.txt @ 23:ba47f936e9f6
remove unneeded argument
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Thu, 24 Nov 2011 15:11:31 -0800 |
parents | 80193ae99aaf |
children | d3e3a506dd29 |
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'} |
21
80193ae99aaf
fill out asterisk-style licenses
Jeff Hammel <jhammel@mozilla.com>
parents:
18
diff
changeset
|
18 >>> variables = license.obtain_variables(**variables) |
18
c04a53145f19
interpolate the files, i hope
Jeff Hammel <jhammel@mozilla.com>
parents:
15
diff
changeset
|
19 >>> license.interpolate(directory, variables) |