Removes unused functions and test bag application to iterables.
This commit is contained in:
24
tests/util/test_compat.py
Normal file
24
tests/util/test_compat.py
Normal file
@ -0,0 +1,24 @@
|
||||
import pytest
|
||||
|
||||
from bonobo.util.compat import deprecated, deprecated_alias
|
||||
|
||||
|
||||
def test_deprecated():
|
||||
@deprecated
|
||||
def foo():
|
||||
pass
|
||||
|
||||
foo = deprecated(foo)
|
||||
with pytest.warns(DeprecationWarning):
|
||||
foo()
|
||||
|
||||
|
||||
def test_deprecated_alias():
|
||||
def foo():
|
||||
pass
|
||||
|
||||
foo = deprecated_alias('bar', foo)
|
||||
|
||||
with pytest.warns(DeprecationWarning):
|
||||
foo()
|
||||
|
||||
Reference in New Issue
Block a user