summaryrefslogtreecommitdiff
path: root/tests/unit/conftest.py
blob: 1e0bd9dfa2a36f2dbfe37b4e7a0e7986d65dcb4a (plain)
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
26
27
28
29
30
31
32
33
"""isort test wide fixtures and configuration"""
import os
from pathlib import Path

import pytest

TEST_DIR = os.path.dirname(os.path.abspath(__file__))
SRC_DIR = os.path.abspath(os.path.join(TEST_DIR, "../../isort/"))


@pytest.fixture
def test_dir():
    return TEST_DIR


@pytest.fixture
def src_dir():
    return SRC_DIR


@pytest.fixture
def test_path():
    return Path(TEST_DIR).resolve()


@pytest.fixture
def src_path():
    return Path(SRC_DIR).resolve()


@pytest.fixture
def examples_path():
    return Path(TEST_DIR).resolve() / "example_projects"