MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / test_import_token_from_module

Function test_import_token_from_module

tests_python/test_utilities.py:522–532  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

520
521
522def test_import_token_from_module():
523 from _pydevd_bundle.pydevd_utils import import_attr_from_module
524
525 with pytest.raises(ImportError):
526 import_attr_from_module("sys")
527
528 with pytest.raises(ImportError):
529 import_attr_from_module("sys.settrace.foo")
530
531 assert import_attr_from_module("sys.settrace") == sys.settrace
532 assert import_attr_from_module("threading.Thread.start") == threading.Thread.start

Callers

nothing calls this directly

Calls 1

import_attr_from_moduleFunction · 0.90

Tested by

no test coverage detected