Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pytest_factoryboy/fixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from funcsigs import signature

SEPARATOR = "__"
IS_SUBFACTORY_DEPS_ENABLED = True


FIXTURE_FUNC_FORMAT = """
Expand Down Expand Up @@ -87,7 +88,8 @@ def register(factory_class, _name=None, **kwargs):
else:
value = kwargs.get(attr, value)

if isinstance(value, (factory.SubFactory, factory.RelatedFactory)):
if (IS_SUBFACTORY_DEPS_ENABLED
and isinstance(value, (factory.SubFactory, factory.RelatedFactory))):
subfactory_class = value.get_factory()
subfactory_deps = get_deps(subfactory_class, factory_class)

Expand Down