예제 #1
0
 def test_meta_declaration(self):
     """Tests that false declarations of implementing an API raise an error"""
     assert Utils.not_raises(API.APIError, self.declare_basic_support)
     assert Utils.not_raises(API.APIError, self.declare_inherited_support)
     assert Utils.raises(API.APIError, self.declare_false_support)
     assert Utils.raises(API.APIError, self.declare_false_inherited_support)
     assert Utils.raises(API.APIError, self.declare_ill_support)
예제 #2
0
파일: test_API.py 프로젝트: dave42/j5basic
 def test_meta_declaration(self):
     """Tests that false declarations of implementing an API raise an error"""
     assert Utils.not_raises(API.APIError, self.declare_basic_support)
     assert Utils.not_raises(API.APIError, self.declare_inherited_support)
     assert Utils.raises(API.APIError, self.declare_false_support)
     assert Utils.raises(API.APIError, self.declare_false_inherited_support)
     assert Utils.raises(API.APIError, self.declare_ill_support)
예제 #3
0
파일: test_Utils.py 프로젝트: dee42/j5test
def test_simple_not_raises_returns():
    """check returning a value doesn't cause an error in not_raises"""
    assert Utils.not_raises(ValueError, sample_method, 1)
예제 #4
0
파일: test_Utils.py 프로젝트: j5int/j5test
def test_simple_not_raises_returns():
    """check returning a value doesn't cause an error in not_raises"""
    assert Utils.not_raises(ValueError, sample_method, 1)