MCPcopy Create free account
hub / github.com/ipython/ipython / test_file_options

Method test_file_options

IPython/core/tests/test_run.py:424–430  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

422 nt.assert_raises(Exception, _ip.magic, "run %s" % self.fname)
423
424 def test_file_options(self):
425 src = ('import sys\n'
426 'a = " ".join(sys.argv[1:])\n')
427 self.mktmp(src)
428 test_opts = '-x 3 --verbose'
429 _ip.run_line_magic("run", '{0} {1}'.format(self.fname, test_opts))
430 nt.assert_equal(_ip.user_ns['a'], test_opts)
431
432
433class TestMagicRunWithPackage(unittest.TestCase):

Callers

nothing calls this directly

Calls 3

mktmpMethod · 0.80
run_line_magicMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected