- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for write_text (0.05 sec)
-
docs_src/generate_clients/tutorial004_py39.py
operation_id = operation["operationId"] to_remove = f"{tag}-" new_operation_id = operation_id[len(to_remove) :] operation["operationId"] = new_operation_id
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 493 bytes - Viewed (0) -
tests/test_file_and_form_order_issue_9116.py
client = TestClient(app) @pytest.fixture def tmp_file_1(tmp_path: Path) -> Path: f = tmp_path / "example1.txt" f.write_text("foo") return f @pytest.fixture def tmp_file_2(tmp_path: Path) -> Path: f = tmp_path / "example2.txt" f.write_text("bar") return f @pytest.mark.parametrize("endpoint_path", ("/file_before_form", "/file_after_form"))
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 2.3K bytes - Viewed (0) -
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) -
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) -
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) -
scripts/topic_repos.py
new_repos_content = yaml.dump(data, sort_keys=False, width=200, allow_unicode=True) if repos_old_content == new_repos_content: logging.info("The data hasn't changed. Finishing.") return repos_path.write_text(new_repos_content, encoding="utf-8") logging.info("Setting up GitHub Actions git user") subprocess.run(["git", "config", "user.name", "github-actions[bot]"], check=True) subprocess.run(
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 12:34:01 UTC 2025 - 2.7K bytes - Viewed (0) -
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) -
scripts/sponsors.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 12:34:01 UTC 2025 - 6.1K bytes - Viewed (0) -
scripts/contributors.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 12:34:01 UTC 2025 - 8.6K bytes - Viewed (0) -
scripts/people.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 12.3K bytes - Viewed (0)