예제 #1
0
 def test_dump_to_filename(self):
     """
     Test output to file with a filename specified
     """
     with NamedTemporaryFile() as f:
         zmap._write_zmap(self.catalog, f.name)
         f.seek(0)
         file_content = f.read().decode('utf-8')
     self.assertIn(self._expected_string(self.test_data), file_content)
예제 #2
0
파일: test_zmap.py 프로젝트: rpratt20/obspy
 def test_dump_to_filename(self):
     """
     Test output to file with a filename specified
     """
     with NamedTemporaryFile() as f:
         zmap._write_zmap(self.catalog, f.name)
         f.seek(0)
         file_content = f.read().decode('utf-8')
     self.assertIn(self._expected_string(self.test_data), file_content)
예제 #3
0
파일: test_zmap.py 프로젝트: obspy/obspy
 def test_dump_to_file(self):
     """
     Test output to pre-opened file
     """
     with NamedTemporaryFile() as f:
         zmap._write_zmap(self.catalog, f)
         f.seek(0)
         file_content = f.read().decode("utf-8")
     self.assertIn(self._expected_string(self.test_data), file_content)