@contextmanager
def assert_deprecation_warning(self):
    with warnings.catch_warnings(record=True) as w:
        warnings.simplefilter('always')
        (yield w)
@contextmanager
def assert_deprecation_warning(self):
    with warnings.catch_warnings(record=True) as w:
        warnings.simplefilter('always')
        (yield w)