コード例 #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)