<s> from . import unittest <EOL> from shapely . geometry . base import BaseGeometry <EOL> import shapely . geometry as sgeom <EOL> from shapely . geometry . polygon import LinearRing <EOL> class EmptinessTestCase ( unittest . TestCase ) : <EOL> def test_empty_base ( self ) : <EOL> g = BaseGeometry ( ) <EOL> self . assertTrue ( g . _is_empty ) <EOL> def test_emptying_point ( self ) : <EOL> p = sgeom . Point ( <NUM_LIT:0> , <NUM_LIT:0> ) <EOL> self . assertFalse ( p . _is_empty ) <EOL> p . empty ( ) <EOL> self . assertTrue ( p . _is_empty ) <EOL> def test_none_geom ( self ) : <EOL> p = BaseGeometry ( ) <EOL> p . _geom = None <EOL> self . assertTrue ( p . is_empty ) <EOL> def test_empty_point ( self ) : <EOL> self . assertTrue ( sgeom . Point ( ) . is_empty ) <EOL> def test_empty_multipoint ( self ) : <EOL> self . assertTrue ( sgeom . MultiPoint ( ) . is_empty ) <EOL> def test_empty_geometry_collection ( self ) : <EOL> self . assertTrue ( sgeom . GeometryCollection ( ) . is_empty ) <EOL> def test_empty_linestring ( self ) : <EOL> self . assertTrue ( sgeom . LineString ( ) . is_empty ) <EOL> def test_empty_multilinestring ( self ) : <EOL> self . assertTrue ( sgeom . MultiLineString ( [ ] ) . is_empty ) <EOL> def test_empty_polygon ( self ) : <EOL> self . assertTrue ( sgeom . Polygon ( ) . is_empty ) <EOL> def test_empty_multipolygon ( self ) : <EOL> self . assertTrue ( sgeom . MultiPolygon ( [ ] ) . is_empty ) <EOL> def test_empty_linear_ring ( self ) : <EOL> self . assertTrue ( LinearRing ( ) . is_empty ) <EOL> def test_suite ( ) : <EOL> return unittest . TestLoader ( ) . loadTestsFromTestCase ( EmptinessTestCase ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
