Skip to content

Tests fail with Pytest 4 #173

@mbakke

Description

@mbakke

Running the tests with Pytest 4.3.0 results in:

==================================== ERRORS ====================================
___________________________ ERROR collecting test.py ___________________________
/gnu/store/5rk8i4agggzcyyg5k73i0ps3p8llcgh6-python-pluggy-0.9.0/lib/python3.7/site-packages/pluggy/hooks.py:289: in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
/gnu/store/5rk8i4agggzcyyg5k73i0ps3p8llcgh6-python-pluggy-0.9.0/lib/python3.7/site-packages/pluggy/manager.py:68: in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
/gnu/store/5rk8i4agggzcyyg5k73i0ps3p8llcgh6-python-pluggy-0.9.0/lib/python3.7/site-packages/pluggy/manager.py:62: in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
/gnu/store/hrpai18igc7k5pkm8lv5a0q4qkjwkynp-python-pytest-4.3.0/lib/python3.7/site-packages/_pytest/python.py:226: in pytest_pycollect_makeitem
    res = list(collector._genfunctions(name, obj))
/gnu/store/hrpai18igc7k5pkm8lv5a0q4qkjwkynp-python-pytest-4.3.0/lib/python3.7/site-packages/_pytest/python.py:403: in _genfunctions
    self.ihook.pytest_generate_tests(metafunc=metafunc)
/gnu/store/5rk8i4agggzcyyg5k73i0ps3p8llcgh6-python-pluggy-0.9.0/lib/python3.7/site-packages/pluggy/hooks.py:289: in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
/gnu/store/5rk8i4agggzcyyg5k73i0ps3p8llcgh6-python-pluggy-0.9.0/lib/python3.7/site-packages/pluggy/manager.py:68: in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
/gnu/store/5rk8i4agggzcyyg5k73i0ps3p8llcgh6-python-pluggy-0.9.0/lib/python3.7/site-packages/pluggy/manager.py:62: in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
/gnu/store/hrpai18igc7k5pkm8lv5a0q4qkjwkynp-python-pytest-4.3.0/lib/python3.7/site-packages/_pytest/python.py:133: in pytest_generate_tests
    metafunc.parametrize(*marker.args, **marker.kwargs)
/gnu/store/hrpai18igc7k5pkm8lv5a0q4qkjwkynp-python-pytest-4.3.0/lib/python3.7/site-packages/_pytest/python.py:995: in parametrize
    function_definition=self.definition,
/gnu/store/hrpai18igc7k5pkm8lv5a0q4qkjwkynp-python-pytest-4.3.0/lib/python3.7/site-packages/_pytest/mark/structures.py:114: in _for_parametrize
    if len(param.values) != len(argnames):
E   TypeError: object of type 'MarkDecorator' has no len()
!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
=========================== 1 error in 0.52 seconds ============================

This is also the case on Travis: https://travis-ci.org/chardet/chardet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions