Skip to content

Commit 547dbba

Browse files
committed
Split complex multi-line test into multiple lines
1 parent 0e21eba commit 547dbba

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Lib/test/test_symtable.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,12 @@ def test_annotated(self):
151151

152152
# Test that annotations for nonlocals are valid after the
153153
# variable is declared as nonlocal.
154-
st6 = symtable.symtable('def g():\n x=2\n def f():\n'
155-
' nonlocal x\n x:int', 'test', 'exec')
154+
st6 = symtable.symtable('def g():\n'
155+
' x = 2\n'
156+
' def f():\n'
157+
' nonlocal x\n'
158+
' x: int',
159+
'test', 'exec')
156160

157161
def test_imported(self):
158162
self.assertTrue(self.top.lookup("sys").is_imported())

0 commit comments

Comments
 (0)