summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIwan Aucamp <aucampia@gmail.com>2023-03-11 14:16:39 +0100
committerGitHub <noreply@github.com>2023-03-11 14:16:39 +0100
commit09b90693ee519ba84e14f17a3a57d3d884c3082f (patch)
tree3eaa0dd48aa6c2bf8cc898d6144cfe05787a9d6b
parent1df827aa1760f8da79ce4bea89fa4fc26acaecad (diff)
downloadrdflib-09b90693ee519ba84e14f17a3a57d3d884c3082f.tar.gz
test: fix deprecation warnings (#2260)
This changes the test the code to avoid deprecation warnings that occur. Mostly related to changes in python threading and pytest.
-rw-r--r--test/test_serializers/test_prettyxml.py2
-rw-r--r--test/test_serializers/test_serializer_xml.py2
-rw-r--r--test/test_store/test_store_sparqlstore.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/test/test_serializers/test_prettyxml.py b/test/test_serializers/test_prettyxml.py
index 1876fa2c..4d406a6e 100644
--- a/test/test_serializers/test_prettyxml.py
+++ b/test/test_serializers/test_prettyxml.py
@@ -10,7 +10,7 @@ from rdflib.term import BNode, Literal, URIRef
class SerializerTestBase(object):
repeats = 8
- def setup(self):
+ def setup_method(self):
graph = ConjunctiveGraph()
graph.parse(data=self.testContent, format=self.testContentFormat)
self.sourceGraph = graph
diff --git a/test/test_serializers/test_serializer_xml.py b/test/test_serializers/test_serializer_xml.py
index f305f508..bac0169d 100644
--- a/test/test_serializers/test_serializer_xml.py
+++ b/test/test_serializers/test_serializer_xml.py
@@ -9,7 +9,7 @@ from rdflib.term import BNode, URIRef
class SerializerTestBase(object):
repeats = 8
- def setup(self):
+ def setup_method(self):
graph = ConjunctiveGraph()
graph.parse(data=self.testContent, format=self.testContentFormat)
self.sourceGraph = graph
diff --git a/test/test_store/test_store_sparqlstore.py b/test/test_store/test_store_sparqlstore.py
index fa98b956..62542047 100644
--- a/test/test_store/test_store_sparqlstore.py
+++ b/test/test_store/test_store_sparqlstore.py
@@ -431,7 +431,7 @@ class TestSPARQLStoreUpdate:
# Start running mock server in a separate thread.
# Daemon threads automatically shut down when the main process exits.
mock_server_thread = Thread(target=mock_server.serve_forever)
- mock_server_thread.setDaemon(True)
+ mock_server_thread.daemon = True
mock_server_thread.start()
print(
"Started mocked sparql endpoint on http://localhost:{port}/".format(