Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions libs/astradb/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,12 @@ ignore = [
"ERA", # Do we want to activate (no commented code) ?
"ISC001", # Messes with the formatter
"PLR09", # TODO: do we enforce these ones (complexity) ?
"PTH", # Do we want to activate (use pathlib) ?

"BLE001", # TODO
"PT011", # TODO
"PT012", # TODO
"D101", # TODO
"D417", # TODO
"PTH", # TODO

]

Expand Down
9 changes: 5 additions & 4 deletions libs/astradb/tests/integration_tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
from __future__ import annotations

import os
from pathlib import Path
from typing import TypedDict

import pytest
from astrapy import Database
from astrapy.db import AstraDB

# Getting the absolute path of the current file's directory
ABS_PATH = os.path.dirname(os.path.abspath(__file__))
ABS_PATH = (Path(__file__)).parent

# Getting the absolute path of the project's root directory
PROJECT_DIR = os.path.abspath(os.path.join(ABS_PATH, os.pardir, os.pardir))
PROJECT_DIR = Path(ABS_PATH).parent.parent


# Loading the .env file if it exists
def _load_env() -> None:
dotenv_path = os.path.join(PROJECT_DIR, "tests", "integration_tests", ".env")
if os.path.exists(dotenv_path):
dotenv_path = Path(PROJECT_DIR) / "tests" / "integration_tests" / ".env"
if Path(dotenv_path).exists():
from dotenv import load_dotenv

load_dotenv(dotenv_path)
Expand Down