Skip to content

Conversation

@YuriiMotov
Copy link
Member

@YuriiMotov YuriiMotov commented Dec 2, 2025

There are no tests for variants of test_main_005 and test_main_006 in docs_src/tutorial/fastapi/app_testing/tutorial001**.
And I don't know how to add them as it seems there is no way to import fixture dynamically (so, we can only duplicate test files for each variant).

But actually we already run these tests as I explained in this comment. So, maybe we can remove all files in test_app_testing except test_tutorial001_tests_main.py. Or leave it as it is

…d `docs_src.tutorial.connect.select.tutorial002*`


def test_run_tests(module: ModuleType):
test_path = Path(module.__file__).resolve().parent
Copy link
Member Author

Choose a reason for hiding this comment

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

This way we run all tests inside docs_src/tutorial/fastapi/app_testing/tutorial001 and its variants:

print(result.stdout.decode("utf-8"))

docs_src/tutorial/fastapi/app_testing/tutorial001/test_extra_coverage.py .....                                                                                                                                                                                                        [ 27%]
docs_src/tutorial/fastapi/app_testing/tutorial001/test_main.py .......                                                                                                                                                                                                                [ 66%]
docs_src/tutorial/fastapi/app_testing/tutorial001/test_main_001.py .                                                                                                                                                                                                                  [ 72%]
docs_src/tutorial/fastapi/app_testing/tutorial001/test_main_002.py .                                                                                                                                                                                                                  [ 77%]
docs_src/tutorial/fastapi/app_testing/tutorial001/test_main_003.py .                                                                                                                                                                                                                  [ 83%]
docs_src/tutorial/fastapi/app_testing/tutorial001/test_main_004.py .                                                                                                                                                                                                                  [ 88%]
docs_src/tutorial/fastapi/app_testing/tutorial001/test_main_005.py .                                                                                                                                                                                                                  [ 94%]
docs_src/tutorial/fastapi/app_testing/tutorial001/test_main_006.py .  

So, probably test_tutorial001_tests001.py ... test_tutorial001_tests006.py are redundant

@YuriiMotov YuriiMotov marked this pull request as ready for review December 3, 2025 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant