<s> import pytest <EOL> from shapely . geometry import Point <EOL> from shapely . impl import delegated , ImplementationError <EOL> def test_error ( ) : <EOL> with pytest . raises ( ImplementationError ) : <EOL> Point ( <NUM_LIT:0> , <NUM_LIT:0> ) . impl [ '<STR_LIT>' ] ( ) <EOL> with pytest . raises ( NotImplementedError ) : <EOL> Point ( <NUM_LIT:0> , <NUM_LIT:0> ) . impl [ '<STR_LIT>' ] ( ) <EOL> with pytest . raises ( KeyError ) : <EOL> Point ( <NUM_LIT:0> , <NUM_LIT:0> ) . impl [ '<STR_LIT>' ] ( ) <EOL> def test_delegated ( ) : <EOL> class Poynt ( Point ) : <EOL> @ delegated <EOL> def bogus ( self ) : <EOL> return self . impl [ '<STR_LIT>' ] ( ) <EOL> with pytest . raises ( ImplementationError ) : <EOL> Poynt ( <NUM_LIT:0> , <NUM_LIT:0> ) . bogus ( ) <EOL> with pytest . raises ( AttributeError ) : <EOL> Poynt ( <NUM_LIT:0> , <NUM_LIT:0> ) . bogus ( ) </s>
