| 1 |
"""isort test wide fixtures and configuration""" |
| 2 |
|
| 3 |
import os |
| 4 |
from pathlib import Path |
| 5 |
|
| 6 |
import pytest |
| 7 |
|
| 8 |
TEST_DIR = os.path.dirname(os.path.abspath(__file__)) |
| 9 |
SRC_DIR = os.path.abspath(os.path.join(TEST_DIR, "../../isort/")) |
| 10 |
|
| 11 |
|
| 12 |
@pytest.fixture |
| 13 |
def test_dir() -> str: |
| 14 |
return TEST_DIR |
| 15 |
|
| 16 |
|
| 17 |
@pytest.fixture |
| 18 |
def src_dir() -> str: |
| 19 |
return SRC_DIR |
| 20 |
|
| 21 |
|
| 22 |
@pytest.fixture |
| 23 |
def test_path() -> Path: |
| 24 |
return Path(TEST_DIR).resolve() |
| 25 |
|
| 26 |
|
| 27 |
@pytest.fixture |
| 28 |
def src_path() -> Path: |
| 29 |
return Path(SRC_DIR).resolve() |
| 30 |
|
| 31 |
|
| 32 |
@pytest.fixture |
| 33 |
def examples_path() -> Path: |
| 34 |
return Path(TEST_DIR).resolve() / "example_projects" |