- Sort Score
- Num 10 results
- Language All
Results 101 - 110 of 403 for mytest (0.05 seconds)
-
.github/workflows/update-perf-test-buckets.yml
name: Auto update performance test durations JSON on: schedule: - cron: '53 3 * * 1' workflow_dispatch: permissions: contents: write id-token: write pull-requests: write jobs: update-perf-test-buckets: runs-on: ubuntu-latest if: github.repository == 'gradle/gradle' steps: - name: Checkout repository uses: actions/checkout@v6 - name: configure aws credentialsCreated: Wed Apr 01 11:36:16 GMT 2026 - Last Modified: Tue Mar 24 22:05:21 GMT 2026 - 1.9K bytes - Click Count (0) -
tests/test_empty_router.py
import pytest from fastapi import APIRouter, FastAPI from fastapi.exceptions import FastAPIError from fastapi.testclient import TestClient app = FastAPI() router = APIRouter() @router.get("") def get_empty(): return ["OK"] app.include_router(router, prefix="/prefix") client = TestClient(app) def test_use_empty(): with client: response = client.get("/prefix")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Jun 11 22:37:34 GMT 2023 - 805 bytes - Click Count (1) -
tests/test_fastapi_cli.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Dec 02 04:02:38 GMT 2025 - 866 bytes - Click Count (0) -
tests/test_additional_responses_bad.py
import pytest from fastapi import FastAPI from fastapi.testclient import TestClient app = FastAPI() @app.get("/a", responses={"hello": {"description": "Not a valid additional response"}}) async def a(): pass # pragma: no cover openapi_schema = { "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/a": { "get": { "responses": {
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 1.1K bytes - Click Count (0) -
tests/test_param_include_in_schema.py
import pytest from fastapi import Cookie, FastAPI, Header, Path, Query from fastapi.testclient import TestClient from inline_snapshot import snapshot app = FastAPI() @app.get("/hidden_cookie") async def hidden_cookie( hidden_cookie: str | None = Cookie(default=None, include_in_schema=False), ): return {"hidden_cookie": hidden_cookie} @app.get("/hidden_header") async def hidden_header(
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 8.6K bytes - Click Count (0) -
scripts/tests/test_translation_fixer/test_code_blocks/test_code_blocks_lines_number_mismatch.py
from pathlib import Path import pytest from typer.testing import CliRunner from scripts.translation_fixer import cli data_path = Path( "scripts/tests/test_translation_fixer/test_code_blocks/data" ).absolute() @pytest.mark.parametrize( "copy_test_files", [(f"{data_path}/en_doc.md", f"{data_path}/translated_doc_lines_number_gt.md")], indirect=True, ) def test_gt(runner: CliRunner, root_dir: Path, copy_test_files):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Jan 10 22:43:44 GMT 2026 - 1.9K bytes - Click Count (0) -
scripts/tests/test_translation_fixer/test_code_blocks/test_code_blocks_wrong_lang_code.py
from pathlib import Path import pytest from typer.testing import CliRunner from scripts.translation_fixer import cli data_path = Path( "scripts/tests/test_translation_fixer/test_code_blocks/data" ).absolute() @pytest.mark.parametrize( "copy_test_files", [(f"{data_path}/en_doc.md", f"{data_path}/translated_doc_wrong_lang_code.md")], indirect=True, )
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Jan 10 22:43:44 GMT 2026 - 1.9K bytes - Click Count (0) -
scripts/tests/test_translation_fixer/test_header_permalinks/test_header_level_mismatch.py
from pathlib import Path import pytest from typer.testing import CliRunner from scripts.translation_fixer import cli data_path = Path( "scripts/tests/test_translation_fixer/test_header_permalinks/data" ).absolute() @pytest.mark.parametrize( "copy_test_files", [(f"{data_path}/en_doc.md", f"{data_path}/translated_doc_level_mismatch_1.md")], indirect=True, )
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Jan 10 22:43:44 GMT 2026 - 2K bytes - Click Count (0) -
docs/zh/docs/advanced/async-tests.md
让我们看看如何才能实现这一点。 ## pytest.mark.anyio { #pytest-mark-anyio } 如果我们想在测试中调用异步函数,那么我们的测试函数必须是异步的。 AnyIO 为此提供了一个简洁的插件,它允许我们指定一些测试函数要异步调用。 ## HTTPX { #httpx } 即使您的 **FastAPI** 应用程序使用普通的 `def` 函数而不是 `async def` ,它本质上仍是一个 `async` 异步应用程序。 `TestClient` 在内部通过一些“魔法”操作,使得您可以在普通的 `def` 测试函数中调用异步的 FastAPI 应用程序,并使用标准的 pytest。但当我们在异步函数中使用它时,这种“魔法”就不再生效了。由于测试以异步方式运行,我们无法在测试函数中继续使用 `TestClient`。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 3.9K bytes - Click Count (0) -
scripts/tests/test_translation_fixer/test_code_includes/test_number_mismatch.py
from pathlib import Path import pytest from typer.testing import CliRunner from scripts.translation_fixer import cli data_path = Path( "scripts/tests/test_translation_fixer/test_code_includes/data" ).absolute() @pytest.mark.parametrize( "copy_test_files", [(f"{data_path}/en_doc.md", f"{data_path}/translated_doc_number_gt.md")], indirect=True, ) def test_gt(runner: CliRunner, root_dir: Path, copy_test_files):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Jan 10 22:43:44 GMT 2026 - 1.9K bytes - Click Count (0)