Skip to content

Commit 03e88bc

Browse files
committed
Add test for default config check
1 parent 94063b2 commit 03e88bc

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

exasol/toolbox/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def excluded_python_paths(self) -> tuple[str, ...]:
110110
this property is used to exclude such undesired paths.
111111
"""
112112
return tuple(
113-
DEFAULT_EXCLUDED_PATHS.union(set(self.add_to_excluded_python_paths))
113+
sorted(DEFAULT_EXCLUDED_PATHS.union(set(self.add_to_excluded_python_paths)))
114114
)
115115

116116
@computed_field # type: ignore[misc]

test/unit/config_test.py

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from pathlib import Path
2+
13
import pytest
24
from pydantic_core._pydantic_core import ValidationError
35

@@ -11,7 +13,32 @@
1113
class TestBaseConfig:
1214
@staticmethod
1315
def test_works_as_defined(test_project_config_factory):
14-
test_project_config_factory()
16+
config = test_project_config_factory()
17+
18+
root_path = config.root_path
19+
assert config.model_dump() == {
20+
"add_to_excluded_python_paths": (),
21+
"create_major_version_tags": False,
22+
"documentation_path": root_path / "doc",
23+
"exasol_versions": ("7.1.30", "8.29.6", "2025.1.0"),
24+
"excluded_python_paths": (
25+
".eggs",
26+
".html-documentation",
27+
".poetry",
28+
".sonar",
29+
".venv",
30+
"dist",
31+
"venv",
32+
),
33+
"minimum_python_version": "3.10",
34+
"project_name": "test",
35+
"python_versions": ("3.10", "3.11", "3.12", "3.13", "3.14"),
36+
"pyupgrade_argument": ("--py310-plus",),
37+
"root_path": root_path,
38+
"sonar_code_path": Path("exasol/test"),
39+
"source_code_path": root_path / "exasol" / "test",
40+
"version_filepath": root_path / "exasol" / "test" / "version.py",
41+
}
1542

1643
@staticmethod
1744
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)