Skip to content

Commit

Permalink
Skip WMS_GetPrint_SRS test in PyQgsServer, instead of commenting out
Browse files Browse the repository at this point in the history
As per discussion with Alessandro Pasotti
  • Loading branch information
dakcarto committed Mar 9, 2017
1 parent bed3af2 commit 2af1e9f
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions tests/src/python/test_qgsserver.py
Expand Up @@ -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({
Expand Down

0 comments on commit 2af1e9f

Please sign in to comment.