MCPcopy
hub / github.com/scrapy/scrapy / test_load_object_exceptions

Method test_load_object_exceptions

tests/test_utils_misc/__init__.py:34–40  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

32 assert obj is load_object
33
34 def test_load_object_exceptions(self):
35 with pytest.raises(ImportError):
36 load_object("nomodule999.mod.function")
37 with pytest.raises(NameError):
38 load_object("scrapy.utils.misc.load_object999")
39 with pytest.raises(TypeError):
40 load_object({})
41
42 def test_walk_modules(self):
43 mods = walk_modules_iter("tests.test_utils_misc.test_walk_modules")

Callers

nothing calls this directly

Calls 1

load_objectFunction · 0.90

Tested by

no test coverage detected