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)
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)
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)
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)