[svn r37540] Nicer formatting of docstrings (de-indented and such), fixed problem getting
to frame source (IOError that popped up when building the py lib's api docs) in description.py. --HG-- branch : trunk
This commit is contained in:
@@ -69,6 +69,13 @@ def setup_fs_project(name):
|
||||
assert pak.main.sub.func(20) is None
|
||||
s = pak.main.func(pak.main.SomeTestClass, 10)
|
||||
assert isinstance(s, pak.main.SomeTestClass)
|
||||
|
||||
# some nice things to confuse the tracer/storage
|
||||
source = py.code.Source('''\
|
||||
pak.main.sub.func(10)
|
||||
''')
|
||||
c = compile(str(source), '<test>', 'exec')
|
||||
exec c in globals()
|
||||
"""))
|
||||
return temp, 'pak'
|
||||
|
||||
|
||||
@@ -43,3 +43,12 @@ def test_source_dirs_files():
|
||||
assert dirnames == ['sub']
|
||||
assert filenames == ['file1.py', 'file3.c']
|
||||
|
||||
def test_deindent():
|
||||
assert htmlgen.deindent('foo\n\n bar\n ') == 'foo\n\nbar\n'
|
||||
assert htmlgen.deindent(' foo\n\n bar\n ') == 'foo\n\nbar\n'
|
||||
assert htmlgen.deindent('foo\n\n bar\n baz') == 'foo\n\nbar\nbaz\n'
|
||||
assert htmlgen.deindent(' foo\n\n bar\n baz\n') == (
|
||||
'foo\n\nbar\n baz\n')
|
||||
assert htmlgen.deindent('foo\n\n bar\n baz\n') == (
|
||||
'foo\n\n bar\nbaz\n')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user