예제 #1
0
    def test_plot(self, image_path, all_files):
        """
        Run obspy-plot on selected tests
        """
        # Copy files to a temp folder to avoid wildcard scans.
        with TemporaryWorkingDirectory():
            all_files_list = []
            for filename in all_files:
                newname = join(os.curdir, basename(filename))
                shutil.copy(filename, newname)
                all_files_list += [newname]

            obspy_plot(['--outfile', str(image_path)] + all_files_list)
예제 #2
0
파일: test_plot.py 프로젝트: rpratt20/obspy
    def test_plot(self):
        """
        Run obspy-plot on selected tests
        """
        # Copy files to a temp folder to avoid wildcard scans.
        with TemporaryWorkingDirectory():
            all_files = []
            for filename in self.all_files:
                newname = join(os.curdir, basename(filename))
                shutil.copy(filename, newname)
                all_files += [newname]

            with ImageComparison(self.path, 'plot.png') as ic:
                obspy_plot(['--outfile', ic.name] + all_files)
예제 #3
0
파일: test_plot.py 프로젝트: Brtle/obspy
    def test_plot(self):
        """
        Run obspy-plot on selected tests
        """
        # Copy files to a temp folder to avoid wildcard scans.
        with TemporaryWorkingDirectory():
            all_files = []
            for filename in self.all_files:
                newname = join(os.curdir, basename(filename))
                shutil.copy(filename, newname)
                all_files += [newname]

            with ImageComparison(self.path, 'plot.png') as ic:
                obspy_plot(['--outfile', ic.name] + all_files)
예제 #4
0
    def test_plot(self):
        """
        Run obspy-plot on selected tests
        """
        reltol = 1
        if MATPLOTLIB_VERSION < [1, 3, 0]:
            reltol = 60

        # Copy files to a temp folder to avoid wildcard scans.
        with TemporaryWorkingDirectory():
            all_files = []
            for filename in self.all_files:
                newname = join(os.curdir, basename(filename))
                shutil.copy(filename, newname)
                all_files += [newname]

            with ImageComparison(self.path, 'plot.png', reltol=reltol) as ic:
                with CatchOutput():
                    obspy_plot(['--outfile', ic.name] + all_files)
예제 #5
0
    def test_plot(self):
        """
        Run obspy-plot on selected tests
        """
        reltol = 1
        if MATPLOTLIB_VERSION < [1, 3, 0]:
            reltol = 60

        # Copy files to a temp folder to avoid wildcard scans.
        with TemporaryWorkingDirectory():
            all_files = []
            for filename in self.all_files:
                newname = join(os.curdir, basename(filename))
                shutil.copy(filename, newname)
                all_files += [newname]

            with ImageComparison(self.path, 'plot.png', reltol=reltol) as ic:
                with CatchOutput():
                    obspy_plot(['--outfile', ic.name] + all_files)