File: test_enums.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 (21 lines) | stat: -rw-r--r-- 507 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
"""Enum tests"""

import pytest

from rasterio import enums


def test_grey_gray():
    """Name of ColorInterp.grey is 'gray'"""
    assert enums.ColorInterp.grey.name == "gray"


def test_gray_gray():
    """Name of ColorInterp.gray is 'gray'"""
    assert enums.ColorInterp.gray.name == "gray"


@pytest.mark.parametrize("resamp", enums.OverviewResampling)
def test_resampling(resamp):
    """Make sure that resampling value are the same."""
    assert resamp.value == enums.Resampling[resamp.name].value