Skip to content

Commit

Permalink
update tests with shapely to allow leniency for python 3.8 (#473)
Browse files Browse the repository at this point in the history
  • Loading branch information
snowman2 authored Nov 1, 2019
1 parent b870289 commit 81f1012
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
9 changes: 7 additions & 2 deletions test/test_doctest_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import doctest
import os
import platform
import sys

import pyproj

Expand All @@ -25,12 +26,16 @@ def test_doctests():
+ failure_count_geod
+ failure_count_transform
)
# shapely wheels not on windows, so allow failures there
# Missing shapely wheels for Windows, non x86_64 platforms, and python 3.8
expected_failure_count = 0
try:
import shapely # noqa
except ImportError:
if os.name == "nt" or platform.uname()[4] != "x86_64":
if (
os.name == "nt"
or platform.uname()[4] != "x86_64"
or (sys.version_info.major, sys.version_info.minor) >= (3, 8)
):
expected_failure_count = 6

# if the below line fails, doctests have failed
Expand Down
10 changes: 8 additions & 2 deletions test/test_geod.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pickle
import platform
import shutil
import sys
import tempfile
from contextlib import contextmanager

Expand All @@ -28,8 +29,13 @@


skip_shapely = pytest.mark.skipif(
not SHAPELY_LOADED and (os.name == "nt" or platform.uname()[4] != "x86_64"),
reason="Missing shapely wheels for Windows.",
not SHAPELY_LOADED
and (
os.name == "nt"
or platform.uname()[4] != "x86_64"
or (sys.version_info.major, sys.version_info.minor) >= (3, 8)
),
reason="Missing shapely wheels for Windows, non x86_64 platforms, and python 3.8.",
)


Expand Down

0 comments on commit 81f1012

Please sign in to comment.