示例#1
0
 def test_badinsout(self):
     with self.assertRaises(ValueError):
         convert.convert(
             [os.path.join(THIS_DIR, 'input_data', 'small_data.mat')],
             'dummy')
     with self.assertRaises(ValueError):
         convert.convert(
             [os.path.join(THIS_DIR, 'input_data', 'small_data.wtf')],
             'shp')
示例#2
0
    def test_segy_save(self):
        convert.convert(os.path.join(THIS_DIR, 'input_data', 'small_data.mat'),
                        'sgy',
                        in_fmt='mat')
        self.assertTrue(
            os.path.exists(
                os.path.join(THIS_DIR, 'input_data', 'small_data.sgy')))

        convert.convert(os.path.join(THIS_DIR, 'input_data',
                                     'shots0001_0200.segy'),
                        'mat',
                        in_fmt='segy')
示例#3
0
    def test_nosegy(self):
        with self.assertRaises(ImportError):
            convert.convert(
                [os.path.join(THIS_DIR, 'input_data', 'test_pe.DT1')],
                'mat',
                in_fmt='segy')

        with self.assertRaises(ImportError):
            convert.convert(
                [os.path.join(THIS_DIR, 'input_data', 'small_data.mat')],
                'sgy',
                in_fmt='mat')
示例#4
0
    def test_knownload2mat(self):
        convert.convert([os.path.join(THIS_DIR, 'input_data', 'test_pe.DT1')],
                        'mat',
                        in_fmt='pe')
        self.assertTrue(
            os.path.exists(os.path.join(THIS_DIR, 'input_data',
                                        'test_pe.mat')))

        convert.convert(
            [os.path.join(THIS_DIR, 'input_data', 'test_gssi.DZT')],
            'mat',
            in_fmt='gssi')
        self.assertTrue(
            os.path.exists(
                os.path.join(THIS_DIR, 'input_data', 'test_gssi.mat')))
示例#5
0
    def test_guessload2shp(self):
        convert.convert(os.path.join(THIS_DIR, 'input_data', 'small_data.mat'),
                        'shp')
        self.assertTrue(
            os.path.exists(
                os.path.join(THIS_DIR, 'input_data', 'small_data.shp')))

        convert.convert([os.path.join(THIS_DIR, 'input_data', 'test_pe.DT1')],
                        'shp')
        self.assertTrue(
            os.path.exists(os.path.join(THIS_DIR, 'input_data',
                                        'test_pe.shp')))

        convert.convert(
            [os.path.join(THIS_DIR, 'input_data', 'test_gssi.DZT')], 'shp')
        self.assertTrue(
            os.path.exists(
                os.path.join(THIS_DIR, 'input_data', 'test_gssi.shp')))