Comments (3)
importing it directly from pytest_lazyfixture import lazy_fixture
(and using lazy_fixture
directly) seems to be a workaround
from pytest-lazy-fixture.
Without doing what @tadeu proposes, mypy (>=0.991) complains about this now:
error: "object" not callable [operator]
@TvoroG could you add proper typing for this project (see the typeshed stubs above)? It would make this issue go away generically! :)
from pytest-lazy-fixture.
The pytest devs consider monkey-patching invalid:
We no longer recommend to "install" things into the pytest namespace. +1
One of the reasons is static type checkers.
Hence, the solution (and not just a workaround) is this:
importing it directly from pytest_lazyfixture import lazy_fixture (and using lazy_fixture directly) seems to be a workaround
This is also the way it's documented in the pytest-lazyfixture
docs. So I think y'all can close this issue.
from pytest-lazy-fixture.
Related Issues (20)
- Add tests to source distribution
- 0.5.2 problem with pytest-asyncio HOT 4
- lazy-fixture-0.5.2: function fixture runs before module fixture HOT 6
- Fixture with numpy array as value fails on 0.6.0 HOT 3
- error with pytest==5.3.0 HOT 5
- Use fixture names to generate test ids? HOT 4
- Broken by pytest 5.3.3 HOT 5
- SINDy defaults are instances of classes
- autouse=True of lazy_fixture breaks nose tests
- pytest-lazy-fixture breaks with Traits in factoryboy 3.2.0: 'Maybe' object has no attribute 'call' HOT 3
- skipping one of parametrized tests with `lazy_fixture` fails HOT 2
- TypeError: 'LazyFixture' object is not iterable HOT 3
- Nested lazy fixtures not respecting scope HOT 2
- TypeError: 'LazyFixture' object is not subscriptable
- Pytest discovery changes test names when using multiple lazy fixtures
- Using fixture that returns a list of parameters, is it possible? HOT 1
- lazy-fixture on fixture whose argument is a fixture HOT 1
- Inquiry about the status of pytest-lazy-fixture and offering assistance HOT 8
- Raise error with `pytest==8.0.0` HOT 20
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytest-lazy-fixture.