comparison tests/test_ini.txt @ 64:f0f3525486db

test calling the section wrapper, [foo:@:fibonacci]
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 09 Jun 2011 09:17:59 -0700
parents 97800b02f636
children b9d9a94bfa19
comparison
equal deleted inserted replaced
63:995b831041be 64:f0f3525486db
37 37
38 >>> fib = inifactory.load('readable-fibonacci') 38 >>> fib = inifactory.load('readable-fibonacci')
39 >>> [fib(i) for i in range(5)] 39 >>> [fib(i) for i in range(5)]
40 ['one', 'one', 'two', 'three', 5] 40 ['one', 'one', 'two', 'three', 5]
41 41
42 A different kind of wrapper, [foo:@:fibonacci]:: 42 A different kind of wrapper, wrapping a section, [foo:@:fibonacci]::
43 43
44 >>> fib = inifactory.load('foo') 44 >>> fib = inifactory.load('foo')
45 >>> 'objects.py.Wrapper' in repr(fib) 45 >>> 'objects.py.Wrapper' in repr(fib)
46 True 46 True
47 >>> inifactory.config['foo']['kwargs']['app'] 47 >>> inifactory.config['foo']['kwargs']['app']
48 '%(fibonacci)s' 48 '%(fibonacci)s'
49 49 >>> [fib(i) for i in range(6)]
50 ['one', 'one', 'two', 'three', 5, 8]