Skip to content

Commit

Permalink
Using PROJECT_ROOT from constants.py definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
joao-parana committed Sep 18, 2023
1 parent 6c65052 commit fafdbb1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/t8s/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""Constants for use with tests. Don't move this file elsewhere"""
from __future__ import annotations

import pathlib

CONSTANTS_DIR = pathlib.Path(__file__).parent
if not str(CONSTANTS_DIR).endswith('t8s/src/t8s'):
raise ValueError("This file must be in a directory named 'src/t8s'")
# caminho absoluto para o diretório do projeto
PROJECT_ROOT = CONSTANTS_DIR.parent.parent
# caminho absoluto para o diretório data
TEST_DATA = PROJECT_ROOT / "data"
TEST_ROOT = PROJECT_ROOT / "tests"

0 comments on commit fafdbb1

Please sign in to comment.