Mercurial > hg > pyloader
annotate tests/test_ini.txt @ 32:b98cc94ffcfa
split IniFactory tests to their own file
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 07 Jun 2011 18:52:46 -0700 |
parents | |
children | 48f61cea0a3c |
rev | line source |
---|---|
32
b98cc94ffcfa
split IniFactory tests to their own file
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
1 Test IniFactory |
b98cc94ffcfa
split IniFactory tests to their own file
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
2 =============== |
b98cc94ffcfa
split IniFactory tests to their own file
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
3 |
b98cc94ffcfa
split IniFactory tests to their own file
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
4 Let's test the .ini factory:: |
b98cc94ffcfa
split IniFactory tests to their own file
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
5 |
b98cc94ffcfa
split IniFactory tests to their own file
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
6 >>> import os |
b98cc94ffcfa
split IniFactory tests to their own file
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
7 >>> from pyloader.factory import IniFactory |
b98cc94ffcfa
split IniFactory tests to their own file
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
8 >>> inifile = os.path.join(here, 'test.ini') |
b98cc94ffcfa
split IniFactory tests to their own file
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
9 >>> inifactory = IniFactory(inifile) |
b98cc94ffcfa
split IniFactory tests to their own file
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
10 |
b98cc94ffcfa
split IniFactory tests to their own file
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
11 Load it up:: |
b98cc94ffcfa
split IniFactory tests to their own file
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
12 |
b98cc94ffcfa
split IniFactory tests to their own file
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
13 >>> object = inifactory.load() |
b98cc94ffcfa
split IniFactory tests to their own file
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
14 >>> 'objects.py.StringMunge' in repr(object.__class__) |
b98cc94ffcfa
split IniFactory tests to their own file
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
15 True |