ManderaGeneral/generalimport

Unintentional test skips

Mandera opened this issue · 0 comments

Sometimes a failing test will raise our custom exception which will skip the test, which will hide the actual problem.

Would be nice to be able to decorate something like this

from typing import Optional
from generalimport import *
from generalimport.test.funcs import ImportTestCase

class Test(ImportTestCase):
    @ensure_not_skipped
    def test_type_with_module(self):
        generalimport("fakepackage")
        import fakepackage

        def my_function1(something: Optional[fakepackage]):
            pass

        my_function1(1)