Mercurial > hg > pyloader
comparison tests/test_factory.txt @ 85:418289c0fe3c
STUB: tests/test_call.txt tests/test_factory.txt
| author | Jeff Hammel <k0scist@gmail.com> |
|---|---|
| date | Fri, 21 Mar 2014 21:50:16 -0700 |
| parents | b98cc94ffcfa |
| children |
comparison
equal
deleted
inserted
replaced
| 84:daf3a05a05fe | 85:418289c0fe3c |
|---|---|
| 11 | 11 |
| 12 >>> factory = PyFactory() | 12 >>> factory = PyFactory() |
| 13 | 13 |
| 14 Make a configuration:: | 14 Make a configuration:: |
| 15 | 15 |
| 16 >>> config = {'': {'path': objects + ':stringsort', 'args': ['foo', 'bar']}} | 16 >>> config = {'': {'path': objects + ':stringsort', 'args': ['foo', 'bar']}} |
| 17 | 17 |
| 18 Load it:: | 18 Load it:: |
| 19 | 19 |
| 20 >>> factory.configure(config) | 20 >>> factory.configure(config) |
| 21 | 21 |
| 30 ... 'callback': {'path': objects + ':stringsort'} } | 30 ... 'callback': {'path': objects + ':stringsort'} } |
| 31 >>> factory.configure(config) | 31 >>> factory.configure(config) |
| 32 >>> obj = factory.load() | 32 >>> obj = factory.load() |
| 33 >>> obj('foobar') | 33 >>> obj('foobar') |
| 34 'PRE:abfoor' | 34 'PRE:abfoor' |
| 35 |
