Esempio n. 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)
Esempio n. 2
0
    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)
Esempio n. 3
0
    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)
Esempio n. 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)
Esempio n. 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)