MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_option

Function test_option

test/mitmproxy/test_optmanager.py:359–370  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

357
358
359def test_option():
360 o = optmanager._Option("test", int, 1, "help", None)
361 assert o.current() == 1
362 with pytest.raises(TypeError):
363 o.set("foo")
364 with pytest.raises(TypeError):
365 optmanager._Option("test", str, 1, "help", None)
366
367 o2 = optmanager._Option("test", int, 1, "help", None)
368 assert o2 == o
369 o2.set(5)
370 assert o2 != o
371
372
373def test_dump_defaults():

Callers

nothing calls this directly

Calls 2

currentMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…