Skip to content

Commit e4d163c

Browse files
test: Add tests for long simple lines
1 parent c1ac48d commit e4d163c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/test_util/test_pformat.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,15 @@ def test_frozenset(self):
9393
})'''), pformat(frozenset({(1, 3), (1, 3, 4), (1, 2)}), indent=4))
9494
self.assertEqual("frozenset({-8, -1, 2, 'abc', 'ad'})",
9595
pformat(frozenset({-8, 'abc', 2, -1, 'ad'})))
96+
97+
def test_long_simple(self):
98+
self.assertEqual(dedent('''
99+
[
100+
3.14159265358979,
101+
2.7182818284509
102+
]'''), pformat([3.14159265358979, 2.71828182845090], max_simple_len=28))
103+
self.assertEqual(dedent('''
104+
[
105+
3.14159265358979,
106+
2.7182818284509
107+
]'''), pformat([3.14159265358979, 2.71828182845090], max_simple_len=34))

0 commit comments

Comments
 (0)