Exemplo n.º 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)
Exemplo n.º 2
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)
Exemplo n.º 3
0
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)
Exemplo n.º 4
0
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)