本文整理汇总了Python中pyvo.dal.query.votableparse函数的典型用法代码示例。如果您正苦于以下问题:Python votableparse函数的具体用法?Python votableparse怎么用?Python votableparse使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了votableparse函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
def setUp(self):
resultfile = os.path.join(testdir, siaresultfile)
self.tbl = votableparse(resultfile)
self.result = sia.SIAResults(self.tbl)
self.rec = self.result.getrecord(0)
self.cleanfiles()
示例2: setUp
def setUp(self):
resultfile = get_pkg_data_filename(ssaresultfile)
self.tbl = votableparse(resultfile)
self.result = ssa.SSAResults(self.tbl)
self.rec = self.result.getrecord(0)
self.outdir = tempfile.mkdtemp()
示例3: testErrorParam
def testErrorParam(self):
resultfile = os.path.join(testdir, "error2-cs.xml")
self.tbl = votableparse(resultfile)
try:
res = cs.SCSResults(self.tbl)
self.fail("Failed to detect error response")
except dalq.DALQueryError, ex:
self.assertEquals(ex.label, "Error")
self.assertEquals(ex.reason, "DEC parameter out-of-range")
示例4: testErrorResourceInfo
def testErrorResourceInfo(self):
resultfile = os.path.join(testdir, "error3-cs.xml")
self.tbl = votableparse(resultfile)
try:
res = cs.SCSResults(self.tbl)
self.fail("Failed to detect error response")
except dalq.DALQueryError, ex:
self.assertEquals(ex.label, "Error")
self.assertEquals(ex.reason, "Forced Fail")
示例5: testErrorResourceInfo
def testErrorResourceInfo(self):
resultfile = get_pkg_data_filename("data/error3-cs.xml")
self.tbl = votableparse(resultfile)
try:
res = cs.SCSResults(self.tbl)
self.fail("Failed to detect error response")
except dalq.DALQueryError as ex:
self.assertEquals(ex.label, "Error")
self.assertEquals(ex.reason, "Forced Fail")
示例6: testCtorSimpleResource
def testCtorSimpleResource(self):
import pyvo.registry.vao as reg
regresultfile = \
get_pkg_data_filename("../../registry/tests/data/reg-short.xml")
res = dalq.DALResults(votableparse(regresultfile))
# import pytest; pytest.set_trace()
srv = dalq.DALService(self.baseurl, "sga", "3.0",
reg.SimpleResource(res, 0))
self.assertTrue(len(srv.info.keys()) > 0)
self.assertTrue(srv.info.get("title") is not None)
示例7: testErrorParam
def testErrorParam(self):
resultfile = get_pkg_data_filename("data/error2-cs.xml")
self.tbl = votableparse(resultfile)
try:
res = cs.SCSResults(self.tbl)
self.fail("Failed to detect error response")
except dalq.DALQueryError as ex:
self.assertEquals(ex.label, "Error")
# Note: because it is stored in a PARAM and the datatype is "char",
# the value will come out as bytes (rather than unicode)
self.assertEquals(ex.reason, b"DEC parameter out-of-range")
示例8: setUp
def setUp(self):
resultfile = get_pkg_data_filename(siaresultfile)
self.tbl = votableparse(resultfile)
self.result = sia.SIAResults(self.tbl)
self.rec = self.result.getrecord(0)
示例9: setUp
def setUp(self):
resultfile = get_pkg_data_filename(regresultfile)
self.tbl = votableparse(resultfile)
self.result = reg.RegistryResults(self.tbl)
self.setrec(0)
示例10: setUp
def setUp(self):
resultfile = os.path.join(testdir, regresultfile)
self.tbl = votableparse(resultfile)
self.result = reg.RegistryResults(self.tbl)
self.setrec(0)
示例11: setUp
def setUp(self):
resultfile = get_pkg_data_filename(csresultfile)
self.tbl = votableparse(resultfile)
self.result = cs.SCSResults(self.tbl)
self.rec = self.result.getrecord(0)
示例12: setUp
def setUp(self):
resultfile = os.path.join(testdir, siaresultfile)
self.tbl = votableparse(resultfile)
self.result = dalq.DALResults(self.tbl)
self.rec = self.result.getrecord(0)
示例13: setUp
def setUp(self):
resultfile = os.path.join(testdir, slaresultfile)
self.tbl = votableparse(resultfile)
self.result = sla.SLAResults(self.tbl)
self.rec = self.result.getrecord(0)
示例14: setUp
def setUp(self):
resultfile = os.path.join(testdir, csresultfile)
self.tbl = votableparse(resultfile)
self.result = cs.SCSResults(self.tbl)
self.rec = self.result.getrecord(0)