[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:
guido
2007-01-29 15:20:31 +01:00
parent 02abf0ee5d
commit 06cbe63616
4 changed files with 68 additions and 7 deletions
@@ -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'
+9
View File
@@ -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')