File: test_show_versions.py

package info (click to toggle)
python-geopandas 0.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 12,004 kB
  • sloc: python: 14,226; makefile: 150; sh: 14
file content (51 lines) | stat: -rw-r--r-- 1,171 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
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
from geopandas.tools._show_versions import (
    _get_C_info,
    _get_deps_info,
    _get_sys_info,
    show_versions,
)


def test_get_sys_info():
    sys_info = _get_sys_info()

    assert "python" in sys_info
    assert "executable" in sys_info
    assert "machine" in sys_info


def test_get_c_info():
    C_info = _get_C_info()

    assert "GEOS" in C_info
    assert "GEOS lib" in C_info
    assert "GDAL" in C_info
    assert "GDAL data dir" in C_info
    assert "PROJ" in C_info
    assert "PROJ data dir" in C_info


def test_get_deps_info():
    deps_info = _get_deps_info()

    assert "geopandas" in deps_info
    assert "pandas" in deps_info
    assert "fiona" in deps_info
    assert "numpy" in deps_info
    assert "shapely" in deps_info
    assert "rtree" in deps_info
    assert "pyproj" in deps_info
    assert "matplotlib" in deps_info
    assert "mapclassify" in deps_info
    assert "geopy" in deps_info
    assert "psycopg2" in deps_info
    assert "geoalchemy2" in deps_info


def test_show_versions(capsys):
    show_versions()
    out, err = capsys.readouterr()

    assert "python" in out
    assert "GEOS" in out
    assert "geopandas" in out