MCPcopy Index your code
hub / github.com/ipython/ipython / test_magic_parse_options

Function test_magic_parse_options

tests/test_magic.py:174–185  ·  view source on GitHub ↗

Test that we don't mangle paths when parsing magic options.

()

Source from the content-addressed store, hash-verified

172
173
174def test_magic_parse_options():
175 """Test that we don't mangle paths when parsing magic options."""
176 ip = get_ipython()
177 path = "c:\\x"
178 m = DummyMagics(ip)
179 opts = m.parse_options("-f %s" % path, "f:")[0]
180 # argv splitting is os-dependent
181 if os.name == "posix":
182 expected = "c:x"
183 else:
184 expected = path
185 assert opts["f"] == expected
186
187
188def test_magic_parse_long_options():

Callers

nothing calls this directly

Calls 3

get_ipythonFunction · 0.90
DummyMagicsClass · 0.85
parse_optionsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…