File: test_finder.py

package info (click to toggle)
python-rtree 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 444 kB
  • sloc: python: 3,434; makefile: 97; sh: 52
file content (19 lines) | stat: -rw-r--r-- 426 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from ctypes import CDLL
from pathlib import Path

from rtree import finder


def test_load():
    lib = finder.load()
    assert isinstance(lib, CDLL)


def test_get_include():
    incl = finder.get_include()
    assert isinstance(incl, str)
    if incl:
        path = Path(incl)
        assert path.is_dir()
        assert (path / "spatialindex").is_dir()
        assert (path / "spatialindex" / "SpatialIndex.h").is_file()