Closed pbrady closed 10 years ago
Allow arguments to be passed to test().
Ensure tests which are supposed to raise warnings do, by using the warnings.catch_warning context manager.
In [1]: import fastcache In [2]: fastcache.test('-k', 'warn') ============================= test session starts ============================== platform linux -- Python 3.4.1 -- py-1.4.25 -- pytest-2.6.3 collected 29 items fastcache/tests/test_clrucache.py .. ======================= 27 tests deselected by '-kwarn' ======================== =================== 2 passed, 27 deselected in 0.10 seconds ==================== Out[2]: True In [3]: fastcache.test('-k', 'warn') ============================= test session starts ============================== platform linux -- Python 3.4.1 -- py-1.4.25 -- pytest-2.6.3 collected 29 items fastcache/tests/test_clrucache.py .. ======================= 27 tests deselected by '-kwarn' ======================== =================== 2 passed, 27 deselected in 0.04 seconds ==================== Out[3]: True
Allow arguments to be passed to test().
Ensure tests which are supposed to raise warnings do, by using the warnings.catch_warning context manager.