I use the package parameterized(by wolever) withnosetests. I built the following packages and modules with Python 3 :
src
|__utils
| |_kwargs.py
| |_exceptions.py
|
tests
|__test_kwargs.py
In test_kwargs.py, I try to test custom exceptions from exceptions.py. In the following case, I test if the function correct_kwargs occurs a ValueNotMatchOption exception. But it seems to be a problem of package or a hierarchy of modules :
Function :
def test_Test_KwargsException(self,_,oracle_test,test):
assert_raises(ValueNotMatchOption,is_correct_kwargs(oracle_test,test))
Error :
ils/check_kwargs.py", line 27, in is_correct_kwargs
raise ValueNotMatchOption("ggd")
src.utils.exceptions.ValueNotMatchOption: ggd
Thanks.
Aucun commentaire:
Enregistrer un commentaire