File: conftest.py

package info (click to toggle)
sphinxcontrib-restbuilder 0.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 640 kB
  • sloc: python: 1,048; makefile: 20; sh: 6
file content (25 lines) | stat: -rw-r--r-- 479 bytes parent folder | download | duplicates (3)
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
from os.path import dirname, realpath, join
import shutil

import pytest


@pytest.fixture
def src_dir():
    return join(
        dirname(realpath(__file__)), 'datasets'
    )


@pytest.fixture
def expected_dir():
    return join(
        dirname(realpath(__file__)), 'expected'
    )


@pytest.fixture(scope="session")
def output_dir():
    out_dir = realpath(join(dirname(realpath(__file__)), '..', 'output'))
    shutil.rmtree(out_dir, ignore_errors=True)
    return out_dir