Skip to content

Commit 9f465ca

Browse files
committed
adding unit test for whitespace around type selector
1 parent af3e416 commit 9f465ca

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

fprettify/tests/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,13 @@ def test_whitespace(self):
149149
args = ['-w', str(w)]
150150
self.assert_fprettify_result(args, instring, out)
151151

152+
def test_type_selector(self):
153+
"""test for whitespace formatting option -w 4"""
154+
instring = "A%component=func(mytype%a,mytype%abc+mytype%abcd)"
155+
outstring_exp = "A % component = func(mytype % a, mytype % abc + mytype % abcd)"
156+
157+
self.assert_fprettify_result(['-w 4'], instring, outstring_exp)
158+
152159
def test_indent(self):
153160
"""simple test for indent options -i in [0, 3, 4]"""
154161

0 commit comments

Comments
 (0)