From fc86b3cc16fa7d5b604cff0ec200566b2528c632 2021-04-18 13:41:04 From: Blazej Michalik Date: 2021-04-18 13:41:04 Subject: [PATCH] Reformat test code --- diff --git a/IPython/core/tests/test_inputtransformer2_line.py b/IPython/core/tests/test_inputtransformer2_line.py index f93c68f..8643a46 100644 --- a/IPython/core/tests/test_inputtransformer2_line.py +++ b/IPython/core/tests/test_inputtransformer2_line.py @@ -62,36 +62,48 @@ for a in range(5): """) -IPYTHON_PROMPT_VI_INS = ("""\ +IPYTHON_PROMPT_VI_INS = ( + """\ [ins] In [11]: def a(): ...: 123 ...: ...: 123 -""", """\ +""", + """\ def a(): 123 123 -""") +""", +) -IPYTHON_PROMPT_VI_NAV = ("""\ +IPYTHON_PROMPT_VI_NAV = ( + """\ [nav] In [11]: def a(): ...: 123 ...: ...: 123 -""", """\ +""", + """\ def a(): 123 123 -""") +""", +) def test_ipython_prompt(): - for sample, expected in [IPYTHON_PROMPT, IPYTHON_PROMPT_L2, - IPYTHON_PROMPT_VI_INS, IPYTHON_PROMPT_VI_NAV]: - nt.assert_equal(ipt2.ipython_prompt(sample.splitlines(keepends=True)), - expected.splitlines(keepends=True)) + for sample, expected in [ + IPYTHON_PROMPT, + IPYTHON_PROMPT_L2, + IPYTHON_PROMPT_VI_INS, + IPYTHON_PROMPT_VI_NAV, + ]: + nt.assert_equal( + ipt2.ipython_prompt(sample.splitlines(keepends=True)), + expected.splitlines(keepends=True), + ) INDENT_SPACES = ("""\