Replies: 1 comment
-
|
I don't personally use it myself and do explicitly for this reason. This has been kept for backwards compatibility but could remove as part of a future major release |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I don't see a lot of value in getting the factory class as a fixture, why not just use the class directly?
Yes the fixture just returns the class, it doesn't even instantiate it for you: #751
Also, because register_fixture does some frame inspection stuff and inject into globals directly, the fixtures show up as
fixtures defined from polyfactory.pytest_pluginrather than where you usedregister_fixture, and if you define the factories outside ofconftest.pyyou have to know to (undocumented) blindly import the fixture intoconftest.pydespite static type checkers telling you the symbol doesn't exist, or to import the class and runregister_fixtureinsideconftest.py(again undocumented pattern).Beta Was this translation helpful? Give feedback.
All reactions