Mercurial > hg > pyloader
view tests/test_factory.txt @ 14:30979d82c95d
remove silly self-reference code for now
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Fri, 27 May 2011 18:43:14 -0700 |
parents | ff272dcd5cd8 |
children | 0bea5297c156 |
line wrap: on
line source
Test pyloader's Factory ======================= Boilerplate:: >>> import os >>> from pyloader.factory import PyFactory Construct a factory:: >>> factory = PyFactory() Make a configuration:: >>> config = {'': {'path': os.path.join(here, 'objects.py:stringsort'), 'args': ['foo', 'bar']}} Load it:: >>> factory.configure(config) Get the thing:: >>> factory.load() 'abfoor'