示例#1
0
 def test_is_css(self):
     """
     Read files via obspy.core.stream.read function.
     """
     # 1
     assert (_is_css(self.filename_css))
     # check that empty files are not recognized as CSS
     with NamedTemporaryFile() as tf:
         tempfile = tf.name
         fh = open(tempfile, "wb")
         fh.close()
         assert (not _is_css(tempfile))
示例#2
0
文件: test_core.py 项目: Brtle/obspy
 def test_is_css(self):
     """
     Read files via obspy.core.stream.read function.
     """
     # 1
     assert(_is_css(self.filename_css))
     # check that empty files are not recognized as CSS
     with NamedTemporaryFile() as tf:
         tempfile = tf.name
         fh = open(tempfile, "wb")
         fh.close()
         assert(not _is_css(tempfile))
示例#3
0
 def test_is_not_this_format_core(self):
     # check that NNSA files are not recognized as CSS
     assert (not _is_css(self.filename_nnsa))
     # check that CSS file is not recognized as NNSA_KB_CORE
     assert (not _is_nnsa_kb_core(self.filename_css))