Skip to content

Commit 9b94075

Browse files
committed
refactor!: ConfigTestData -> WorkspaceTestData
1 parent 9e5dc74 commit 9b94075

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

tests/fixtures/structures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
@dataclasses.dataclass
6-
class ConfigTestData:
6+
class WorkspaceTestData:
77
expand1: t.Any
88
expand2: t.Any
99
expand_blank: t.Any

tests/workspace/test_config.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from ..constants import EXAMPLE_PATH
1515

1616
if typing.TYPE_CHECKING:
17-
from ..fixtures.structures import ConfigTestData
17+
from ..fixtures.structures import WorkspaceTestData
1818

1919

2020
@pytest.fixture
@@ -25,9 +25,9 @@ def config_fixture():
2525
os.path.expanduser until here.
2626
"""
2727
from ..fixtures import workspace as test_workspace_data
28-
from ..fixtures.structures import ConfigTestData
28+
from ..fixtures.structures import WorkspaceTestData
2929

30-
return ConfigTestData(
30+
return WorkspaceTestData(
3131
**{
3232
k: v
3333
for k, v in test_workspace_data.__dict__.items()
@@ -48,7 +48,7 @@ def load_workspace(path: Union[str, pathlib.Path]) -> str:
4848
)
4949

5050

51-
def test_export_json(tmp_path: pathlib.Path, config_fixture: "ConfigTestData"):
51+
def test_export_json(tmp_path: pathlib.Path, config_fixture: "WorkspaceTestData"):
5252
json_workspace_file = tmp_path / "config.json"
5353

5454
configparser = ConfigReader(config_fixture.sample_workspace.sample_workspace_dict)
@@ -61,7 +61,7 @@ def test_export_json(tmp_path: pathlib.Path, config_fixture: "ConfigTestData"):
6161
assert config_fixture.sample_workspace.sample_workspace_dict == new_workspace_data
6262

6363

64-
def test_export_yaml(tmp_path: pathlib.Path, config_fixture: "ConfigTestData"):
64+
def test_export_yaml(tmp_path: pathlib.Path, config_fixture: "WorkspaceTestData"):
6565
yaml_workspace_file = tmp_path / "config.yaml"
6666

6767
sample_workspace = config.inline(
@@ -106,13 +106,13 @@ def test_scan_workspace(tmp_path: pathlib.Path):
106106
assert len(configs) == files
107107

108108

109-
def test_workspace_expand1(config_fixture: "ConfigTestData"):
109+
def test_workspace_expand1(config_fixture: "WorkspaceTestData"):
110110
"""Expand shell commands from string to list."""
111111
test_workspace = config.expand(config_fixture.expand1.before_workspace)
112112
assert test_workspace == config_fixture.expand1.after_workspace()
113113

114114

115-
def test_workspace_expand2(config_fixture: "ConfigTestData"):
115+
def test_workspace_expand2(config_fixture: "WorkspaceTestData"):
116116
"""Expand shell commands from string to list."""
117117
unexpanded_dict = ConfigReader._load(
118118
format="yaml", content=config_fixture.expand2.unexpanded_yaml()
@@ -235,7 +235,7 @@ def test_inheritance_workspace():
235235
assert workspace == inheritance_workspace_after
236236

237237

238-
def test_shell_command_before(config_fixture: "ConfigTestData"):
238+
def test_shell_command_before(config_fixture: "WorkspaceTestData"):
239239
"""Config inheritance for the nested 'start_command'."""
240240
test_workspace = config_fixture.shell_command_before.config_unexpanded
241241
test_workspace = config.expand(test_workspace)
@@ -246,7 +246,7 @@ def test_shell_command_before(config_fixture: "ConfigTestData"):
246246
assert test_workspace == config_fixture.shell_command_before.config_after()
247247

248248

249-
def test_in_session_scope(config_fixture: "ConfigTestData"):
249+
def test_in_session_scope(config_fixture: "WorkspaceTestData"):
250250
sconfig = ConfigReader._load(
251251
format="yaml", content=config_fixture.shell_command_before_session.before
252252
)
@@ -259,7 +259,7 @@ def test_in_session_scope(config_fixture: "ConfigTestData"):
259259
)
260260

261261

262-
def test_trickle_relative_start_directory(config_fixture: "ConfigTestData"):
262+
def test_trickle_relative_start_directory(config_fixture: "WorkspaceTestData"):
263263
test_workspace = config.trickle(config_fixture.trickle.before)
264264
assert test_workspace == config_fixture.trickle.expected
265265

@@ -282,7 +282,7 @@ def test_trickle_window_with_no_pane_workspace():
282282
}
283283

284284

285-
def test_expands_blank_panes(config_fixture: "ConfigTestData"):
285+
def test_expands_blank_panes(config_fixture: "WorkspaceTestData"):
286286
"""Expand blank config into full form.
287287
288288
Handle ``NoneType`` and 'blank'::

0 commit comments

Comments
 (0)