- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for catch_warnings (0.11 sec)
-
tests/test_multipart_installation.py
multipart_not_installed_error, ) def test_incorrect_multipart_installed_form(monkeypatch): monkeypatch.setattr("python_multipart.__version__", "0.0.12") with warnings.catch_warnings(record=True): warnings.simplefilter("always") monkeypatch.delattr("multipart.multipart.parse_options_header", raising=False) with pytest.raises(RuntimeError, match=multipart_incorrect_install_error):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 21:46:26 UTC 2024 - 5.7K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_tutorial001.py
], ) def get_client(request: pytest.FixtureRequest): clear_sqlmodel() # TODO: remove when updating SQL tutorial to use new lifespan API with warnings.catch_warnings(record=True): warnings.simplefilter("always") mod = importlib.import_module(f"docs_src.sql_databases.{request.param}") clear_sqlmodel() importlib.reload(mod)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 14.8K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_tutorial002.py
], ) def get_client(request: pytest.FixtureRequest): clear_sqlmodel() # TODO: remove when updating SQL tutorial to use new lifespan API with warnings.catch_warnings(record=True): warnings.simplefilter("always") mod = importlib.import_module(f"docs_src.sql_databases.{request.param}") clear_sqlmodel() importlib.reload(mod)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 19.9K bytes - Viewed (0) -
tests/test_generate_unique_id_function.py
return item1 # pragma: nocover @app.post("/third") def post_third(item1: Item): return item1 # pragma: nocover client = TestClient(app) with warnings.catch_warnings(record=True) as w: warnings.simplefilter("always") client.get("/openapi.json") assert len(w) >= 2 duplicate_warnings = [
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jan 13 15:10:26 UTC 2024 - 66.7K bytes - Viewed (0) -
tests/test_include_router_defaults_overrides.py
assert not override4 or "x-level4" in response.headers assert not override5 or "x-level5" in response.headers def test_openapi(): client = TestClient(app) with warnings.catch_warnings(record=True) as w: warnings.simplefilter("always") response = client.get("/openapi.json") assert issubclass(w[-1].category, UserWarning)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 358.6K bytes - Viewed (0)