<s> from . import unittest <EOL> from shapely . geometry import LineString <EOL> from shapely . geometry . collection import GeometryCollection <EOL> class CollectionTestCase ( unittest . TestCase ) : <EOL> def test_array_interface ( self ) : <EOL> m = GeometryCollection ( ) <EOL> self . assertEqual ( len ( m ) , <NUM_LIT:0> ) <EOL> self . assertEqual ( m . geoms , [ ] ) <EOL> def test_child_with_deleted_parent ( self ) : <EOL> a = LineString ( [ ( <NUM_LIT:0> , <NUM_LIT:0> ) , ( <NUM_LIT:1> , <NUM_LIT:1> ) , ( <NUM_LIT:1> , <NUM_LIT:2> ) , ( <NUM_LIT:2> , <NUM_LIT:2> ) ] ) <EOL> b = LineString ( [ ( <NUM_LIT:0> , <NUM_LIT:0> ) , ( <NUM_LIT:1> , <NUM_LIT:1> ) , ( <NUM_LIT:2> , <NUM_LIT:1> ) , ( <NUM_LIT:2> , <NUM_LIT:2> ) ] ) <EOL> collection = a . intersection ( b ) <EOL> child = collection . geoms [ <NUM_LIT:0> ] <EOL> del collection <EOL> self . assertIsNotNone ( child . wkt ) <EOL> def test_suite ( ) : <EOL> return unittest . TestLoader ( ) . loadTestsFromTestCase ( CollectionTestCase ) </s>
