Skip to content
Permalink
Browse files

Skip WMS_GetPrint_SRS test in PyQgsServer, instead of commenting out

As per discussion with Alessandro Pasotti
  • Loading branch information
dakcarto committed Mar 9, 2017
1 parent bed3af2 commit 2af1e9f4822a8f272bf7df09bac614067bccfa8d
Showing with 18 additions and 17 deletions.
  1. +18 −17 tests/src/python/test_qgsserver.py
@@ -737,23 +737,24 @@ def test_wms_getprint_basic(self):
r, h = self._result(self.server.handleRequest(qs))
self._img_diff_error(r, h, "WMS_GetPrint_Basic")

# def test_wms_getprint_srs(self):
# qs = "&".join(["%s=%s" % i for i in list({
# "MAP": urllib.parse.quote(self.projectPath),
# "SERVICE": "WMS",
# "VERSION": "1.1.1",
# "REQUEST": "GetPrint",
# "TEMPLATE": "layoutA4",
# "FORMAT": "png",
# "map0:EXTENT": "-309.015,-133.011,312.179,133.949",
# "map0:LAYERS": "Country,Hello",
# "HEIGHT": "500",
# "WIDTH": "500",
# "CRS": "EPSG:4326"
# }.items())])
#
# r, h = self._result(self.server.handleRequest(qs))
# self._img_diff_error(r, h, "WMS_GetPrint_SRS")
@unittest.skip('Randomly failing to draw the map layer')

This comment has been minimized.

Copy link
@m-kuhn

m-kuhn Mar 10, 2017

Member

Looks much better.
What do you think about adding a condition here. Something like

@unittest.skipIf(os.environ['TRAVIS'] == 'true', 'Randomly failing to draw the map layer')

This will improve the chance that someone discovers the test failing on his system (although that he realizes that this is interesting is still unlikely)

CC @elpaso

This comment has been minimized.

Copy link
@elpaso

elpaso Mar 10, 2017

Contributor

@m-kuhn Yes, that's a good idea!

def test_wms_getprint_srs(self):
qs = "&".join(["%s=%s" % i for i in list({
"MAP": urllib.parse.quote(self.projectPath),
"SERVICE": "WMS",
"VERSION": "1.1.1",
"REQUEST": "GetPrint",
"TEMPLATE": "layoutA4",
"FORMAT": "png",
"map0:EXTENT": "-309.015,-133.011,312.179,133.949",
"map0:LAYERS": "Country,Hello",
"HEIGHT": "500",
"WIDTH": "500",
"CRS": "EPSG:4326"
}.items())])

r, h = self._result(self.server.handleRequest(qs))
self._img_diff_error(r, h, "WMS_GetPrint_SRS")

def test_wms_getprint_scale(self):
qs = "&".join(["%s=%s" % i for i in list({

0 comments on commit 2af1e9f

Please sign in to comment.
You can’t perform that action at this time.