Skip to content

Chore: Isolate web tests#3076

Merged
tobymao merged 3 commits intomainfrom
vchan/chore-isolate-web-tests
Sep 3, 2024
Merged

Chore: Isolate web tests#3076
tobymao merged 3 commits intomainfrom
vchan/chore-isolate-web-tests

Conversation

@vchan
Copy link
Copy Markdown
Contributor

@vchan vchan commented Aug 31, 2024

This PR attempts to fix flaky web/UI lineage tests (when run in parallel) by reseting FastAPI app dependency overrides in between tests and creating a new TestClient per test.

@vchan vchan requested a review from a team August 31, 2024 01:05
from __future__ import annotations

from pathlib import Path
import typing as t
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don’t need types in tests


@pytest.fixture
def project_tmp_path(tmp_path: Path) -> Path:
def project_tmp_path(tmp_path: Path) -> t.Generator[Path, None, None]:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can just be like iterator right? or just remove the types

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll remove the types.

@tobymao tobymao merged commit b6618e5 into main Sep 3, 2024
@tobymao tobymao deleted the vchan/chore-isolate-web-tests branch September 3, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants