##// END OF EJS Templates
Add failing test for completing arguments after '%run foo.py '
Thomas Kluyver -
Show More
@@ -31,9 +31,11 b' class MockEvent(object):'
31 31 # Test functions begin
32 32 #-----------------------------------------------------------------------------
33 33 class Test_magic_run_completer(unittest.TestCase):
34 files = [u"aao.py", u"a.py", u"b.py", u"aao.txt"]
35
34 36 def setUp(self):
35 37 self.BASETESTDIR = tempfile.mkdtemp()
36 for fil in [u"aao.py", u"a.py", u"b.py", u"aao.txt"]:
38 for fil in self.files:
37 39 with open(join(self.BASETESTDIR, fil), "w") as sfile:
38 40 sfile.write("pass\n")
39 41 self.oldpath = py3compat.getcwd()
@@ -66,6 +68,11 b' class Test_magic_run_completer(unittest.TestCase):'
66 68 match = set(magic_run_completer(mockself, event))
67 69 self.assertEqual(match, set([u"a.py", u"aao.py"]))
68 70
71 def test_completion_more_args(self):
72 event = MockEvent(u'%run a.py ')
73 match = set(magic_run_completer(None, event))
74 self.assertEqual(match, set(self.files))
75
69 76 def test_completion_in_dir(self):
70 77 # Github issue #3459
71 78 event = MockEvent(u'%run a.py {}'.format(join(self.BASETESTDIR, 'a')))
General Comments 0
You need to be logged in to leave comments. Login now