Esempio n. 1
0
 def test_isCSS(self):
     """
     Read files via obspy.core.stream.read function.
     """
     # 1
     assert (isCSS(self.filename))
     # check that empty files are not recognized as CSS
     with NamedTemporaryFile() as tf:
         tempfile = tf.name
         fh = open(tempfile, "wb")
         fh.close()
         assert (not isCSS(tempfile))
Esempio n. 2
0
 def test_isCSS(self):
     """
     Read files via obspy.core.stream.read function.
     """
     # 1
     assert(isCSS(self.filename))
     # check that empty files are not recognized as CSS
     with NamedTemporaryFile() as tf:
         tempfile = tf.name
         fh = open(tempfile, "wb")
         fh.close()
         assert(not isCSS(tempfile))
Esempio n. 3
0
 def test_isCSS(self):
     """
     Read files via obspy.core.stream.read function.
     """
     # 1
     assert(isCSS(self.filename))
     # check that empty files are not recognized as CSS
     tempfile = NamedTemporaryFile().name
     with open(tempfile, "wb") as fh:
         pass
     try:
         assert(not isCSS(tempfile))
     finally:
         # cleanup
         os.remove(tempfile)