Skip to content

Commit

Permalink
Add required import to example code
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning committed Sep 30, 2019
1 parent 2b912d6 commit cb7c5de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ When running unit tests for a library using `datafiles`,
it can be helpful to disable automatic loading/saving of models for performance and to avoid writing files to disk:

```python
import datafiles

def pytest_runtest_setup(item):
"""Disable file storage during unit tests."""
datafiles.settings.HOOKS_ENABLED = False
Expand Down

0 comments on commit cb7c5de

Please sign in to comment.