Repository navigation
Closed
Description
Hi,
I am testing this code:
from pytest_cases import pytest_fixture_plus
import pytest
@pytest_fixture_plus(scope="module")
@pytest.mark.parametrize("arg1", [
"one", "two"
])
@pytest.mark.parametrize("arg2", [
"one", "two"
])
def myfix(arg1, arg2):
return (arg1, arg2)
def test_one(myfix):
print(myfix)
And getting this exception:
========================================================================================================================= test session starts ==========================================================================================================================
platform win32 -- Python 3.6.4, pytest-4.3.1, py-1.8.0, pluggy-0.9.0
rootdir: C:\Users\victo\PycharmProjects\testing_parameterize_in_fixtures, inifile:
collected 0 items / 1 errors
================================================================================================================================ ERRORS ================================================================================================================================
___________________________________________________________________________________________________________________ ERROR collecting test_simple.py ____________________________________________________________________________________________________________________
venv\lib\site-packages\makefun\main.py:761: in add_signature_parameters
for param in reversed(first):
E TypeError: 'generator' object is not reversible
During handling of the above exception, another exception occurred:
test_simple.py:9: in <module>
"one", "two"
venv\lib\site-packages\decopatch\utils_modes.py:129: in _apply_decorator
return user_provided_applier(*args, **kwargs)
venv\lib\site-packages\pytest_cases\main.py:368: in pytest_fixture_plus
for n in reversed(new_parameter_names)))
venv\lib\site-packages\makefun\main.py:768: in add_signature_parameters
if first.name in params:
E AttributeError: 'generator' object has no attribute 'name'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
======================================================================================================================= 1 error in 0.34 seconds ========================================================================================================================
This is my environment:
atomicwrites (1.3.0)
attrs (19.1.0)
colorama (0.4.1)
decopatch (1.4.1)
makefun (1.6.0)
more-itertools (6.0.0)
pip (9.0.1)
pluggy (0.9.0)
py (1.8.0)
pytest (4.3.1)
pytest-cases (1.3.1)
setuptools (28.8.0)
six (1.12.0)
Maybe I am doing something wrong?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels
Activity
smarie commentedon Mar 19, 2019
Indeed that was a regression without a proper non-regression test :)
I'm fixing it in a minute, you should receive a notification when the new release is created by travis