Removes unused functions and test bag application to iterables.

This commit is contained in:
Romain Dorgueil
2017-05-20 14:47:30 +02:00
parent 4342035f12
commit 2b3ef05fac
5 changed files with 42 additions and 38 deletions

24
tests/util/test_compat.py Normal file
View 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()