From 3249e15fa5e42fe2bf02575eedd3d87934a6b0aa 2015-04-20 18:38:29 From: Thomas Kluyver Date: 2015-04-20 18:38:29 Subject: [PATCH] Make ascii completion test ignore local files This test was failing because \f completed to a matplotlib fontcache file. That's possibly erroneous, but it's not what this test was checking for, so I made it use a temporary working directory. --- diff --git a/IPython/core/tests/test_completer.py b/IPython/core/tests/test_completer.py index 7639457..470da16 100644 --- a/IPython/core/tests/test_completer.py +++ b/IPython/core/tests/test_completer.py @@ -179,10 +179,11 @@ def test_forward_unicode_completion(): @dec.onlyif(sys.version_info[0] >= 3, 'This test only apply on python3') def test_no_ascii_back_completion(): ip = get_ipython() - # single ascii letter that don't have yet completions - for letter in 'fjqyJMQVWY' : - name, matches = ip.complete('\\'+letter) - nt.assert_equal(len(matches), 0) + with TemporaryWorkingDirectory(): # Avoid any filename completions + # single ascii letter that don't have yet completions + for letter in 'fjqyJMQVWY' : + name, matches = ip.complete('\\'+letter) + nt.assert_equal(matches, [])