Skip to content

Commit

Permalink
move TEST_DIR to const.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zxdavb committed Jan 19, 2025
1 parent 690a6cc commit b459ae9
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
2 changes: 0 additions & 2 deletions tests/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
if TYPE_CHECKING:
import voluptuous as vol

TEST_DIR = Path(__file__).resolve().parent


def assert_schema(folder: Path, schema: vol.Schema, file_name: str) -> None:
if not Path(folder).joinpath(file_name).is_file():
Expand Down
7 changes: 7 additions & 0 deletions tests/tests/const.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""Tests for evohome-async - helper functions."""

from __future__ import annotations

from pathlib import Path

TEST_DIR = Path(__file__).resolve().parent
2 changes: 1 addition & 1 deletion tests/tests/test_schemas_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
)
from evohomeasync2.schemas.status import factory_loc_status

from .common import TEST_DIR
from .conftest import ClientStub
from .const import TEST_DIR

if TYPE_CHECKING:
import pytest
Expand Down
2 changes: 1 addition & 1 deletion tests/tests/test_schemas_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
S2_USE_DAYLIGHT_SAVE_SWITCHING,
)

from .common import TEST_DIR
from .conftest import ClientStub
from .const import TEST_DIR

if TYPE_CHECKING:
import pytest
Expand Down
3 changes: 2 additions & 1 deletion tests/tests/test_systems_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
factory_loc_status,
)

from .common import TEST_DIR, assert_schema
from .common import assert_schema
from .const import TEST_DIR

if TYPE_CHECKING:
import pytest
Expand Down

0 comments on commit b459ae9

Please sign in to comment.