-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixture
does not work with lambdas
#278
Comments
Hi @vyasr , thanks a lot for your positive feedback ! Would you mind letting us know the stacktrace and when it happens (module loading time or later ?) |
I tried on my side and if I use I get the following error at test collection time: ..\.nox\tests-3-9-env-pytest-latest\lib\site-packages\makefun\main.py:629: in _make
code = compile(body, filename, 'single')
E File "<makefun-gen-1034>", line 1
E def <lambda>(request):
E ^
E SyntaxError: invalid syntax This is an error in |
Yes, that is the correct error and I can confirm that smarie/python-makefun#80 fixes the error when I patch that onto the PYTHONPATH. Thanks! I searched through issues on this repo but I didn't recognize that it was coming from the other package! |
This should now work with makefun 1.14. Do you confirm ? |
Closing for now, but feel free to reopen @vyasr |
Apologies for the delayed response. Yes, I can confirm that the newest release of makefun solves the problem! |
Thanks @vyasr ! |
First of all I want to say thanks for a great plugin! I've been making extensive use of it recently. I've found a few minor issues that I wanted to raise, so I wanted to say thank you first!
The problem that I'm running into is that
pytest_cases.fixture
does not support lambdas, butpytest.fixture
does.For context, I am basically doing what is described in this comment to dynamically generate fixtures, which is why using a lambda would be nice.
The text was updated successfully, but these errors were encountered: