mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 17:34:32 +02:00
More robust _called_from_test pattern
This commit is contained in:
parent
e337a88b45
commit
778dad789e
2 changed files with 3 additions and 2 deletions
|
|
@ -5,7 +5,7 @@ from . import hookspecs
|
|||
pm = pluggy.PluginManager("sqlite_utils")
|
||||
pm.add_hookspecs(hookspecs)
|
||||
|
||||
if not hasattr(sys, "_called_from_test"):
|
||||
if not getattr(sys, "_called_from_test", False):
|
||||
# Only load plugins if not running tests
|
||||
pm.load_setuptools_entrypoints("sqlite_utils")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue