New issue 610: Internal error with missing fixture + bad decorator
https://bitbucket.org/hpk42/pytest/issue/610/internal-error-with-missing-fixture-bad

virtuald:

The [decorator](https://pypi.python.org/pypi/decorator) library doesn't seem to 
decorate its functions properly -- and when a test function has one of these 
decorators, and an invalid fixture is specified, an internal error occurs. 
Using decorator 3.4.0, the following code will generate a py.test internal 
error:


```
#!python

import decorator

def bad_decorator(func):
    
    def wrapper(func, *args, **kwargs):
        pass

    return decorator.decorator(wrapper, func)


@bad_decorator
def test_something(missing_fixture):
    pass

```

Arguably decorator should be fixed, but py.test should probably generate a 
better error message too. The error log is attached.



_______________________________________________
pytest-commit mailing list
pytest-commit@python.org
https://mail.python.org/mailman/listinfo/pytest-commit

Reply via email to