Skip to content
Open
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
4 changes: 2 additions & 2 deletions project/swelancer/swelancer/utils/custom_logging.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import time
from pathlib import Path

import blobfile as bf
import structlog
Expand All @@ -8,6 +7,7 @@

from nanoeval.library_config import LibraryConfig, set_library_config
from nanoeval.setup import nanoeval_logging
from swelancer.utils.general import get_runs_dir


def get_timestamp() -> str:
Expand All @@ -17,7 +17,7 @@ def get_timestamp() -> str:


def get_default_runs_dir() -> str:
return str(Path(__name__).parent / "runs")
return str(get_runs_dir())


def setup_logging(library_config: LibraryConfig) -> None:
Expand Down
11 changes: 11 additions & 0 deletions project/swelancer/tests/test_custom_logging.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from pathlib import Path

from swelancer.utils.custom_logging import get_default_runs_dir
from swelancer.utils.general import get_runs_dir


def test_default_runs_dir_uses_project_runs_directory() -> None:
default_runs_dir = Path(get_default_runs_dir())

assert default_runs_dir == get_runs_dir()
assert default_runs_dir.is_absolute()