File: conftest.py

package info (click to toggle)
opgpcard 0.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 864 kB
  • sloc: python: 520; makefile: 19
file content (17 lines) | stat: -rw-r--r-- 362 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
""""""
import pytest


@pytest.fixture()
def datadir(request):
    class D:
        def __init__(self, basepath):
            self.basepath = basepath

        def open(self, name):
            return self.basepath.join(name).open()

        def join(self, name):
            return self.basepath.join(name).strpath

    return D(request.fspath.dirpath("data"))