From 8b13c4b7353c3a2bdcddd27907ba3a50202baaec 2018-10-02 18:14:45 From: Tony Fast Date: 2018-10-02 18:14:45 Subject: [PATCH] Add tests for null cleanup test. --- diff --git a/IPython/core/tests/test_inputtransformer2.py b/IPython/core/tests/test_inputtransformer2.py index f78a0b3..77df22c 100644 --- a/IPython/core/tests/test_inputtransformer2.py +++ b/IPython/core/tests/test_inputtransformer2.py @@ -101,6 +101,12 @@ b) = zip? [r"get_ipython().set_next_input('(a,\nb) = zip');get_ipython().run_line_magic('pinfo', 'zip')" + "\n"] ) +def null_cleanup_transformer(lines): + """ + A cleanup transform that returns an empty list. + """ + return [] + def check_make_token_by_line_never_ends_empty(): """ Check that not sequence of single or double characters ends up leading to en empty list of tokens @@ -215,3 +221,7 @@ def test_check_complete(): for k in short: cc(c+k) +def test_null_cleanup_transformer(): + manager = ipt2.TransformerManager() + manager.cleanup_transforms.insert(0, null_cleanup_transformer) + nt.assert_is(manager.transform_cell(""), "")