#!/usr/bin/env python3 from SPARQLWrapper import * import os import os.path as path import json import glob import time #BaseUrl="http://buda1.bdrc.io:13180/fuseki/bdrcrw/" BaseUrl = "http://localhost:13180/fuseki/corerw/" QueryEndpoint = SPARQLWrapper(BaseUrl + "query") QueryEndpoint.setRequestMethod(POSTDIRECTLY) QueryEndpoint.setMethod(POST) QueryEndpoint.setReturnFormat(JSON) UpdateEndpoint = SPARQLWrapper(BaseUrl + "update") UpdateEndpoint.setRequestMethod(POSTDIRECTLY) UpdateEndpoint.setMethod(POST) ThisPath = os.path.dirname(os.path.abspath(__file__)) def get_all_tests(testgroupname, specifictest=None): grouppath = path.join(ThisPath, testgroupname) res = [] if specifictest is not None: res.append(path.join(grouppath, specifictest)) return res for dirname in sorted(glob.glob(grouppath + "/*")): if path.isdir(dirname): res.append(dirname)
#!/usr/bin/env python3 from SPARQLWrapper import * import os import os.path as path import json import glob import time #BaseUrl="http://buda1.bdrc.io:13180/fuseki/bdrcrw/" BaseUrl="http://localhost:13180/fuseki/bdrcrw/" QueryEndpoint = SPARQLWrapper(BaseUrl+"query") QueryEndpoint.setRequestMethod(POSTDIRECTLY) QueryEndpoint.setMethod(POST) QueryEndpoint.setReturnFormat(JSON) UpdateEndpoint = SPARQLWrapper(BaseUrl+"update") UpdateEndpoint.setRequestMethod(POSTDIRECTLY) UpdateEndpoint.setMethod(POST) ThisPath = os.path.dirname(os.path.abspath(__file__)) def get_all_tests(testgroupname, specifictest=None): grouppath = path.join(ThisPath, testgroupname) res = [] if specifictest is not None: res.append(path.join(grouppath, specifictest)) return res for dirname in sorted(glob.glob(grouppath+"/*")): if path.isdir(dirname): res.append(dirname) return res