File: test__version.py

package info (click to toggle)
rasterio 1.4.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 22,760 kB
  • sloc: python: 22,520; makefile: 275; sh: 164; xml: 29
file content (31 lines) | stat: -rw-r--r-- 755 bytes parent folder | download | duplicates (3)
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
import pytest

from rasterio._version import get_gdal_version_info, get_geos_version, get_proj_version


@pytest.mark.parametrize(
    "key",
    [
        "--version",
        "doesnotexist",
        "VERSION_NUM",
    ],
)
def test_get_gdal_version_info(key):
    assert isinstance(get_gdal_version_info(key), str)


def test_get_proj_version():
    proj_version = get_proj_version()
    assert isinstance(proj_version, tuple)
    assert len(proj_version) == 3
    for version in proj_version:
        assert isinstance(version, int)


def test_get_geos_version():
    geos_version = get_geos_version()
    assert isinstance(geos_version, tuple)
    assert len(geos_version) == 3
    for version in geos_version:
        assert isinstance(version, int)