Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for write_text (0.18 sec)

  1. tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py

                },
            ]
        }
    
    
    def test_post_files_and_token(tmp_path, app: FastAPI):
        patha = tmp_path / "test.txt"
        pathb = tmp_path / "testb.txt"
        patha.write_text("<file content>")
        pathb.write_text("<file b content>")
    
        client = TestClient(app)
        with patha.open("rb") as filea, pathb.open("rb") as fileb:
            response = client.post(
                "/files/",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 7.3K bytes
    - Viewed (0)
  2. scripts/docs.py

        if new_path.exists():
            typer.echo(f"The language was already created: {lang}")
            raise typer.Abort()
        new_path.mkdir()
        new_config_path: Path = Path(new_path) / mkdocs_name
        new_config_path.write_text("INHERIT: ../en/mkdocs.yml\n", encoding="utf-8")
        new_config_docs_path: Path = new_path / "docs"
        new_config_docs_path.mkdir()
        en_index_path: Path = en_docs_path / "docs" / "index.md"
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Dec 21 17:40:17 UTC 2025
    - 16.9K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_static_files/test_tutorial001.py

    
    @pytest.fixture(scope="module")
    def client():
        static_dir: Path = Path(os.getcwd()) / "static"
        static_dir.mkdir(exist_ok=True)
        sample_file = static_dir / "sample.txt"
        sample_file.write_text("This is a sample static file.")
        from docs_src.static_files.tutorial001_py39 import app
    
        with TestClient(app) as client:
            yield client
        sample_file.unlink()
        static_dir.rmdir()
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 1.1K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_generate_clients/test_tutorial004.py

    from docs_src.generate_clients import tutorial003_py39
    
    
    def test_remove_tags(tmp_path: pathlib.Path):
        tmp_file = tmp_path / "openapi.json"
        openapi_json = tutorial003_py39.app.openapi()
        tmp_file.write_text(json.dumps(openapi_json))
    
        with patch("pathlib.Path", return_value=tmp_file):
            importlib.import_module("docs_src.generate_clients.tutorial004_py39")
    
        modified_openapi = json.loads(tmp_file.read_text())
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 8.3K bytes
    - Viewed (0)
  5. scripts/translate.py

        print(f"Running agent for {out_path}")
        result = agent.run_sync(prompt)
        out_content = f"{result.output.strip()}\n"
        print(f"Saving translation to {out_path}")
        out_path.write_text(out_content, encoding="utf-8", newline="\n")
    
    
    def iter_all_en_paths() -> Iterable[Path]:
        """
        Iterate on the markdown files to translate in order of priority.
        """
        first_dirs = [
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:05:53 UTC 2025
    - 34.1K bytes
    - Viewed (0)
Back to top