Skip to content

Commit a193bcd

Browse files
committed
Mark tests that require network or geotiff dependency.
1 parent 04f734b commit a193bcd

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

tests/test_execute.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ def get_output(doc):
235235
class ExecuteTest(TestBase):
236236
"""Test for Exeucte request KVP request"""
237237

238+
@pytest.mark.online
238239
@pytest.mark.xfail(reason="test.opendap.org is offline")
239240
def test_dods(self):
240241
if not WITH_NC4:

tests/test_inout.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import json
1616
from pywps import inout
1717
import base64
18+
import pytest
1819

1920
from pywps import Format, FORMATS
2021
from pywps.app.Common import Metadata
@@ -128,6 +129,7 @@ def test_file(self):
128129
with self.assertRaises(TypeError):
129130
self.iohandler[0].data = '5'
130131

132+
@pytest.mark.online
131133
def test_url(self):
132134
if not service_ok('https://demo.mapserver.org'):
133135
self.skipTest("mapserver is unreachable")
@@ -552,6 +554,7 @@ def test_base64(self):
552554
b = self.complex_out.base64
553555
self.assertEqual(base64.b64decode(b).decode(), self.data)
554556

557+
@pytest.mark.online
555558
def test_url_handler(self):
556559
wfsResource = 'http://demo.mapserver.org/cgi-bin/wfs?' \
557560
'service=WFS&version=1.1.0&' \
@@ -798,6 +801,7 @@ def test_json(self):
798801
)
799802

800803

804+
@pytest.mark.online
801805
class TestMetaLink(TestBase):
802806

803807
def setUp(self) -> None:

tests/test_ows.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from pywps import get_ElementMakerForVersion
1515
import pywps.configuration as config
1616
from pywps.tests import client_for, assert_response_success, service_ok
17+
import pytest
1718

1819
wfsResource = 'https://demo.mapserver.org/cgi-bin/wfs?service=WFS&version=1.1.0&request=GetFeature&typename=continents&maxfeatures=10' # noqa
1920
wcsResource = 'https://demo.mapserver.org/cgi-bin/wcs?service=WCS&version=1.0.0&request=GetCoverage&coverage=ndvi&crs=EPSG:4326&bbox=-92,42,-85,45&format=image/tiff&width=400&height=300' # noqa
@@ -91,6 +92,7 @@ def sum_one(request, response):
9192
supported_formats=[get_format('GEOTIFF')])],
9293
grass_location='epsg:4326')
9394

95+
@pytest.mark.online
9496
def test_wfs(self):
9597
if not service_ok('https://demo.mapserver.org'):
9698
self.skipTest("mapserver is unreachable")
@@ -117,6 +119,7 @@ def test_wfs(self):
117119
# . the inclusion of output
118120
# . the type of output
119121

122+
@pytest.mark.online
120123
def test_wcs(self):
121124
if not config.CONFIG.get('grass', 'gisbase'):
122125
self.skipTest('GRASS lib not found')

tests/validator/test_complexvalidators.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ class data_format(object):
6969

7070
return fake_input
7171

72+
@pytest.mark.online
7273
def test_gml_validator(self):
7374
"""Test GML validator
7475
"""
@@ -79,6 +80,7 @@ def test_gml_validator(self):
7980
# self.assertTrue(validategml(gml_input, MODE.VERYSTRICT), 'VERYSTRICT validation')
8081
gml_input.stream.close()
8182

83+
@pytest.mark.online
8284
@pytest.mark.xfail(reason="gml verystrict validation fails")
8385
def test_gml_validator_verystrict(self):
8486
"""Test GML validator
@@ -117,6 +119,7 @@ def test_shapefile_validator(self):
117119
self.assertTrue(validateshapefile(shapefile_input, MODE.STRICT), 'STRICT validation')
118120
shapefile_input.stream.close()
119121

122+
@pytest.mark.geotiff
120123
def test_geotiff_validator(self):
121124
"""Test GeoTIFF validator
122125
"""
@@ -141,6 +144,7 @@ def test_netcdf_validator(self):
141144
else:
142145
self.assertFalse(validatenetcdf(netcdf_input, MODE.STRICT), 'STRICT validation')
143146

147+
@pytest.mark.online
144148
@pytest.mark.xfail(reason="test.opendap.org is offline")
145149
def test_dods_validator(self):
146150
opendap_input = ComplexInput('dods', 'opendap test', [FORMATS.DODS,])

0 commit comments

Comments
 (0)