MCPcopy Create free account
hub / github.com/shapely/shapely / test_references

Function test_references

shapely/tests/test_strtree.py:80–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78
79
80def test_references():
81 point1 = Point()
82 point2 = Point(0, 1)
83
84 geoms = [point1, point2]
85 tree = STRtree(geoms)
86
87 point1 = None
88 point2 = None
89
90 import gc
91
92 gc.collect()
93
94 # query after freeing geometries does not lead to segfault
95 assert tree.query(box(0, 0, 1, 1)).tolist() == [1]
96
97
98def test_flush_geometries():

Callers

nothing calls this directly

Calls 4

queryMethod · 0.95
PointClass · 0.90
STRtreeClass · 0.90
boxFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…