Skip to content

Commit

Permalink
Merge pull request #59876 from qgis/backport-59871-to-release-3_40
Browse files Browse the repository at this point in the history
[Backport release-3_40] Fix test on newer python versions
  • Loading branch information
alexbruy authored Dec 13, 2024
2 parents 621b329 + 34c07a8 commit d73525d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/src/python/test_qgsserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,12 @@ def test_destructor_segfaults(self):

def test_multiple_servers(self):
"""Segfaults?"""
servers = {}
for i in range(10):
locals()[f"s{i}"] = QgsServer()
locals()[f"rq{i}"] = QgsBufferServerRequest("")
locals()[f"re{i}"] = QgsBufferServerResponse()
locals()[f"s{i}"].handleRequest(locals()[f"rq{i}"], locals()[f"re{i}"])
servers[f"s{i}"] = QgsServer()
servers[f"rq{i}"] = QgsBufferServerRequest("")
servers[f"re{i}"] = QgsBufferServerResponse()
servers[f"s{i}"].handleRequest(servers[f"rq{i}"], servers[f"re{i}"])

def test_requestHandler(self):
"""Test request handler"""
Expand Down

0 comments on commit d73525d

Please sign in to comment.