view tests/test_ini.txt @ 33:48f61cea0a3c

test calling the thing
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 07 Jun 2011 18:55:26 -0700
parents b98cc94ffcfa
children a9eaf65d82c6
line wrap: on
line source

Test IniFactory
===============

Let's test the .ini factory::

    >>> import os
    >>> from pyloader.factory import IniFactory
    >>> inifile = os.path.join(here, 'test.ini')
    >>> inifactory = IniFactory(inifile)

Load it up::

    >>> object = inifactory.load()
    >>> 'objects.py.StringMunge' in repr(object.__class__)
    True

Call it::

    >>> object('foobar')
    'PRE!!!abfoor'