balabit / typesafety

Type safety checker for Python3
GNU Lesser General Public License v2.1
23 stars 9 forks source link

@pytest.fixture compatibility issue #24

Open andras-tim opened 8 years ago

andras-tim commented 8 years ago

Typesafety drops a typesafety.validator.TypesafetyError: Missing required argument '...' exception, when I decorate a py.test helper function with @pytest.fixture

import pytest

class TestFoo:
    @pytest.fixture
    def res(self):
        return Resource()

    def test_foo(self, res: Resource):
        assert res.bar is not None