comparison tests/test_factory.txt @ 11:ff272dcd5cd8

we have a passing test
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 27 May 2011 07:02:27 -0700
parents
children 0bea5297c156
comparison
equal deleted inserted replaced
10:ba2355d57998 11:ff272dcd5cd8
1 Test pyloader's Factory
2 =======================
3
4 Boilerplate::
5
6 >>> import os
7 >>> from pyloader.factory import PyFactory
8
9 Construct a factory::
10
11 >>> factory = PyFactory()
12
13 Make a configuration::
14
15 >>> config = {'': {'path': os.path.join(here, 'objects.py:stringsort'), 'args': ['foo', 'bar']}}
16
17 Load it::
18
19 >>> factory.configure(config)
20
21 Get the thing::
22
23 >>> factory.load()
24 'abfoor'