File size: 570 Bytes
e8b8483
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
"""Shared fixtures for the consistency suite."""
import json
import sys
from pathlib import Path

import pytest

REPO = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(REPO))


def load(rel: str) -> dict:
    """Parse a repo-relative JSON file."""
    return json.loads((REPO / rel).read_text(encoding='utf-8'))


@pytest.fixture(scope='session')
def repo() -> Path:
    return REPO


@pytest.fixture(scope='session')
def rules() -> dict:
    return load('rules.json')


@pytest.fixture(scope='session')
def evaluation() -> dict:
    return load('eval.json')