Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
stefsmeets committed Aug 21, 2024
1 parent 64cfd4b commit fd3d78d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
6 changes: 6 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from __future__ import annotations

import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), 'helpers'))
5 changes: 5 additions & 0 deletions tests/helpers/helpers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from __future__ import annotations

from pathlib import Path

PROTEUS_ROOT = Path(__file__).parents[2]
14 changes: 14 additions & 0 deletions tests/plot/test_cpl_helpers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from __future__ import annotations

from helpers import PROTEUS_ROOT

from proteus.plot._cpl_helpers import get_options_dirs_from_argv


def test_get_options_dirs_from_argv():
default = str(PROTEUS_ROOT / 'input' / 'default.toml')

options, dirs = get_options_dirs_from_argv(default=default)

assert 'star_model' in options
assert 'output' in dirs
4 changes: 1 addition & 3 deletions tests/test_proteus.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
from __future__ import annotations

from itertools import chain
from pathlib import Path

import pytest
from helpers import PROTEUS_ROOT

from proteus import Proteus

PROTEUS_ROOT = Path(__file__).parents[1]

PATHS = chain(
(PROTEUS_ROOT / 'input').glob('*.toml'),
(PROTEUS_ROOT / 'examples').glob('*/*.toml'),
Expand Down

0 comments on commit fd3d78d

Please sign in to comment.