File: test_exception_logging.py

package info (click to toggle)
python-pyproj 3.7.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,720 kB
  • sloc: python: 13,468; sh: 273; makefile: 90
file content (14 lines) | stat: -rw-r--r-- 339 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import pytest

from pyproj import CRS, Proj
from pyproj.exceptions import CRSError, ProjError


def test_proj_exception():
    with pytest.raises(ProjError, match="Internal Proj Error"):
        Proj("+proj=bobbyjoe")


def test_crs_exception():
    with pytest.raises(CRSError, match="Internal Proj Error"):
        CRS("+proj=bobbyjoe")