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

Function test_invalid_format

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

Source from the content-addressed store, hash-verified

4
5
6def test_invalid_format() -> None:
7 with pytest.raises(ImportFromStringError) as exc_info:
8 import_from_string("example:")
9 expected = 'Import string "example:" must be in format "<module>:<attribute>".'
10 assert expected in str(exc_info.value)
11
12
13def test_invalid_module() -> None:

Callers

nothing calls this directly

Calls 1

import_from_stringFunction · 0.90

Tested by

no test coverage detected