Пример #1
0
    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
0
    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()
    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()
Пример #4
0
 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")
Пример #5
0
 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")
Пример #6
0
 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")
Пример #7
0
 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")
Пример #8
0
 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)
Пример #9
0
 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)
Пример #10
0
 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")
Пример #11
0
 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")
Пример #12
0
 def setUp(self):
     resultfile = os.path.join(testdir, errresultfile)
     self.tbl = votableparse(resultfile)
Пример #13
0
 def setUp(self):
     resultfile = get_pkg_data_filename(slaresultfile)
     self.tbl = votableparse(resultfile)
     self.result = sla.SLAResults(self.tbl)
     self.rec = self.result.getrecord(0)
Пример #14
0
 def setUp(self):
     resultfile = get_pkg_data_filename(errresultfile)
     self.tbl = votableparse(resultfile)
Пример #15
0
 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)
Пример #16
0
 def setUp(self):
     resultfile = get_pkg_data_filename(errresultfile)
     self.tbl = votableparse(resultfile)
Пример #17
0
 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)
Пример #18
0
 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)
Пример #19
0
 def setUp(self):
     resultfile = get_pkg_data_filename(siaresultfile)
     self.tbl = votableparse(resultfile)
     self.result = dalq.DALResults(self.tbl)
     self.rec = self.result.getrecord(0)
Пример #20
0
 def setUp(self):
     # load a canned result file
     resultfile = get_pkg_data_filename(regresultfile)
     self.tbl = votableparse(resultfile)
Пример #21
0
 def setUp(self):
     resultfile = get_pkg_data_filename(regresultfile)
     self.tbl = votableparse(resultfile)
     self.result =  reg.RegistryResults(self.tbl)
     self.setrec(0)
Пример #22
0
 def setUp(self):
     resultfile = os.path.join(testdir, regresultfile)
     self.tbl = votableparse(resultfile)
     self.result =  reg.RegistryResults(self.tbl)
     self.setrec(0)
Пример #23
0
 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)
Пример #24
0
 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)
Пример #25
0
 def setUp(self):
     # load a canned result file
     resultfile = os.path.join(testdir, regresultfile)
     self.tbl = votableparse(resultfile)
Пример #26
0
 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)