<s> import abc <EOL> import pytest <EOL> import six <EOL> from cryptography . utils import InterfaceNotImplemented , verify_interface <EOL> class TestVerifyInterface ( object ) : <EOL> def test_verify_missing_method ( self ) : <EOL> @ six . add_metaclass ( abc . ABCMeta ) <EOL> class SimpleInterface ( object ) : <EOL> @ abc . abstractmethod <EOL> def method ( self ) : <EOL> """<STR_LIT>""" <EOL> class NonImplementer ( object ) : <EOL> pass <EOL> with pytest . raises ( InterfaceNotImplemented ) : <EOL> verify_interface ( SimpleInterface , NonImplementer ) <EOL> def test_different_arguments ( self ) : <EOL> @ six . add_metaclass ( abc . ABCMeta ) <EOL> class SimpleInterface ( object ) : <EOL> @ abc . abstractmethod <EOL> def method ( self , a ) : <EOL> """<STR_LIT>""" <EOL> class NonImplementer ( object ) : <EOL> def method ( self ) : <EOL> """<STR_LIT>""" <EOL> NonImplementer ( ) . method ( ) <EOL> with pytest . raises ( InterfaceNotImplemented ) : <EOL> verify_interface ( SimpleInterface , NonImplementer ) <EOL> def test_handles_abstract_property ( self ) : <EOL> @ six . add_metaclass ( abc . ABCMeta ) <EOL> class SimpleInterface ( object ) : <EOL> @ abc . abstractproperty <EOL> def property ( self ) : <EOL> """<STR_LIT>""" <EOL> class NonImplementer ( object ) : <EOL> @ property <EOL> def property ( self ) : <EOL> """<STR_LIT>""" <EOL> NonImplementer ( ) . property <EOL> verify_interface ( SimpleInterface , NonImplementer ) </s>
