Skip to content

Commit b459ae9

Browse files
committed
move TEST_DIR to const.py
1 parent 690a6cc commit b459ae9

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

tests/tests/common.py

-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
if TYPE_CHECKING:
1414
import voluptuous as vol
1515

16-
TEST_DIR = Path(__file__).resolve().parent
17-
1816

1917
def assert_schema(folder: Path, schema: vol.Schema, file_name: str) -> None:
2018
if not Path(folder).joinpath(file_name).is_file():

tests/tests/const.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
"""Tests for evohome-async - helper functions."""
2+
3+
from __future__ import annotations
4+
5+
from pathlib import Path
6+
7+
TEST_DIR = Path(__file__).resolve().parent

tests/tests/test_schemas_0.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
)
2222
from evohomeasync2.schemas.status import factory_loc_status
2323

24-
from .common import TEST_DIR
2524
from .conftest import ClientStub
25+
from .const import TEST_DIR
2626

2727
if TYPE_CHECKING:
2828
import pytest

tests/tests/test_schemas_1.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
S2_USE_DAYLIGHT_SAVE_SWITCHING,
1919
)
2020

21-
from .common import TEST_DIR
2221
from .conftest import ClientStub
22+
from .const import TEST_DIR
2323

2424
if TYPE_CHECKING:
2525
import pytest

tests/tests/test_systems_0.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
factory_loc_status,
1212
)
1313

14-
from .common import TEST_DIR, assert_schema
14+
from .common import assert_schema
15+
from .const import TEST_DIR
1516

1617
if TYPE_CHECKING:
1718
import pytest

0 commit comments

Comments
 (0)