Skip to content

Commit 21b71b3

Browse files
authored
chore(doc): another way to use db_migration fixture
1 parent 5e83b07 commit 21b71b3

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,17 @@ To use globally, add to [pytest options](https://docs.pytest.org/en/stable/refer
227227
db_migration
228228
```
229229

230+
Or depends on it in top-level `conftest.py` and mark it as _autoused_:
231+
232+
```python
233+
from pytest import fixture
234+
235+
236+
@fixture(scope="session", autouse=True)
237+
def db_migration(db_migration):
238+
pass
239+
```
240+
230241
### `alembic_ini_path`
231242

232243
It returns the path of `alembic.ini` configuration file. By default, it returns

0 commit comments

Comments
 (0)