Skip to content

Commit a301cfb

Browse files
committed
Add docstrings to db setup fixtures
1 parent 9b8281f commit a301cfb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pytest_django/fixtures.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,22 +94,26 @@ def django_db_modify_db_settings_parallel_suffix(
9494
def django_db_modify_db_settings(
9595
django_db_modify_db_settings_parallel_suffix: None,
9696
) -> None:
97+
"""Modify db settings just before the databases are configured."""
9798
skip_if_no_django()
9899

99100

100101
@pytest.fixture(scope="session")
101102
def django_db_use_migrations(request: pytest.FixtureRequest) -> bool:
103+
"""Return whether to use migrations to create the test databases."""
102104
return not request.config.getvalue("nomigrations")
103105

104106

105107
@pytest.fixture(scope="session")
106108
def django_db_keepdb(request: pytest.FixtureRequest) -> bool:
109+
"""Return whether to re-use an existing database and to keep it after the test run."""
107110
reuse_db: bool = request.config.getvalue("reuse_db")
108111
return reuse_db
109112

110113

111114
@pytest.fixture(scope="session")
112115
def django_db_createdb(request: pytest.FixtureRequest) -> bool:
116+
"""Return whether the database is to be re-created before running any tests."""
113117
create_db: bool = request.config.getvalue("create_db")
114118
return create_db
115119

0 commit comments

Comments
 (0)