Skip to content

Commit 343fddc

Browse files
test painting docstring
1 parent fab3984 commit 343fddc

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

bpython/test/test_curtsies_painting.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,16 @@ def foo(x, y, z=10):
8989
screen = [(bold(cyan(u'foo'))+cyan(':')+cyan(' ')+cyan('(')+cyan('x') +
9090
yellow(',')+yellow(' ')+bold(cyan('y'))+yellow(',') +
9191
yellow(' ')+cyan('z')+yellow('=')+bold(cyan('10'))+yellow(')'))]
92-
print screen
93-
print array
9492
self.assertFSArraysEqual(fsarray(array), fsarray(screen))
9593

94+
def test_formatted_docstring(self):
95+
actual = replpainter.formatted_docstring(
96+
'Returns the results\n\n' 'Also has side effects',
97+
40, config=setup_config())
98+
expected = fsarray(['Returns the results', '', 'Also has side effects'])
99+
self.assertFSArraysEqualIgnoringFormatting(actual, expected)
100+
101+
96102

97103
@contextmanager
98104
def output_to_repl(repl):

0 commit comments

Comments
 (0)