MCPcopy
hub / github.com/encode/uvicorn / test_invalid_attr

Function test_invalid_attr

tests/importer/test_importer.py:20–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18
19
20def test_invalid_attr() -> None:
21 with pytest.raises(ImportFromStringError) as exc_info:
22 import_from_string("tempfile:attr_does_not_exist")
23 expected = 'Attribute "attr_does_not_exist" not found in module "tempfile".'
24 assert expected in str(exc_info.value)
25
26
27def test_internal_import_error() -> None:

Callers

nothing calls this directly

Calls 1

import_from_stringFunction · 0.90

Tested by

no test coverage detected