File: __init__.py

package info (click to toggle)
segyio 1.8.3-1.2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,724 kB
  • sloc: cpp: 17,823; ansic: 4,637; python: 4,326; makefile: 38; sh: 23
file content (25 lines) | stat: -rw-r--r-- 548 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# -*- coding: utf-8 -*-

import shutil
import pytest

def tmpfiles(*files):
    def tmpfiles_decorator(func):
        def func_wrapper(tmpdir):
            for f in files:
                shutil.copy(f, str(tmpdir))
            func(tmpdir)
        return func_wrapper
    return tmpfiles_decorator


@pytest.fixture
def small(tmpdir):
    shutil.copy("test-data/small.sgy", str(tmpdir))
    return tmpdir / "small.sgy"


@pytest.fixture
def smallps(tmpdir):
    shutil.copy("test-data/small-ps.sgy", str(tmpdir))
    return tmpdir / "small-ps.sgy"