Пример #1
0
 def test_issue298b(self):
     """
     Second test case for issue #298: blockette size exceeds 9999 bytes.
     """
     file = os.path.join(self.path, "AI.ESPZ._.BH_.dataless")
     parser = Parser(file)
     parser.getRESP()
Пример #2
0
 def test_createRESPFromXSEED(self):
     """
     Tests RESP file creation from XML-SEED.
     """
     ### example 1
     # parse Dataless SEED
     filename = os.path.join(self.path, 'dataless.seed.BW_FURT')
     sp1 = Parser(filename)
     # write XML-SEED
     tempfile = NamedTemporaryFile().name
     sp1.writeXSEED(tempfile)
     # parse XML-SEED
     sp2 = Parser(tempfile)
     # create RESP files
     _resp_list = sp2.getRESP()
     os.remove(tempfile)
     ### example 2
     # parse Dataless SEED
     filename = os.path.join(self.path, 'arclink_full.seed')
     sp1 = Parser(filename)
     # write XML-SEED
     tempfile = NamedTemporaryFile().name
     sp1.writeXSEED(tempfile)
     # parse XML-SEED
     sp2 = Parser(tempfile)
     # create RESP files
     _resp_list = sp2.getRESP()
     os.remove(tempfile)
Пример #3
0
 def test_createRESPFromXSEED(self):
     """
     Tests RESP file creation from XML-SEED.
     """
     ### example 1
     # parse Dataless SEED
     filename = os.path.join(self.path, 'dataless.seed.BW_FURT')
     sp1 = Parser(filename)
     # write XML-SEED
     with NamedTemporaryFile() as fh:
         tempfile = fh.name
         sp1.writeXSEED(tempfile)
         # parse XML-SEED
         sp2 = Parser(tempfile)
         # create RESP files
         sp2.getRESP()
     ### example 2
     # parse Dataless SEED
     filename = os.path.join(self.path, 'arclink_full.seed')
     sp1 = Parser(filename)
     # write XML-SEED
     with NamedTemporaryFile() as fh:
         tempfile = fh.name
         sp1.writeXSEED(tempfile)
         # parse XML-SEED
         sp2 = Parser(tempfile)
         # create RESP files
         sp2.getRESP()
Пример #4
0
 def test_issue298b(self):
     """
     Second test case for issue #298: blockette size exceeds 9999 bytes.
     """
     file = os.path.join(self.path, "AI.ESPZ._.BH_.dataless")
     parser = Parser(file)
     parser.getRESP()
Пример #5
0
 def test_createRESPFromXSEED(self):
     """
     Tests RESP file creation from XML-SEED.
     """
     # 1
     # parse Dataless SEED
     filename = os.path.join(self.path, 'dataless.seed.BW_FURT')
     sp1 = Parser(filename)
     # write XML-SEED
     with NamedTemporaryFile() as fh:
         tempfile = fh.name
         sp1.writeXSEED(tempfile)
         # parse XML-SEED
         sp2 = Parser(tempfile)
         # create RESP files
         sp2.getRESP()
     # 2
     # parse Dataless SEED
     filename = os.path.join(self.path, 'arclink_full.seed')
     sp1 = Parser(filename)
     # write XML-SEED
     with NamedTemporaryFile() as fh:
         tempfile = fh.name
         sp1.writeXSEED(tempfile)
         # parse XML-SEED
         sp2 = Parser(tempfile)
         # create RESP files
         sp2.getRESP()