pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/fastapi/fastapi-cli/pull/91.diff

tureFixture -from fastapi_cli.discover import get_import_data +from fastapi_cli.discover import get_app, get_import_data from fastapi_cli.exceptions import FastAPICLIException from tests.utils import changing_dir @@ -169,6 +169,17 @@ def test_broken_package_dir(capsys: CaptureFixture[str]) -> None: assert "Ensure all the package directories have an __init__.py file" in captured.out +def test_get_app_broken_package_dir(capsys: CaptureFixture[str]) -> None: + with changing_dir(assets_path): + # TODO (when deprecating Python 3.8): remove ValueError + with pytest.raises((ImportError, ValueError)): + get_app(path=Path("broken_package/mod/app.py")) + + captured = capsys.readouterr() + assert "Import error:" in captured.out + assert "Ensure all the package directories have an __init__.py file" in captured.out + + def test_package_dir_no_app() -> None: with changing_dir(assets_path): with pytest.raises(FastAPICLIException) as e: pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy