File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,7 @@ def make_workspace_structure(
130
130
"dbgym_workspace" : {
131
131
"symlinks" : symlinks_structure ,
132
132
"task_runs" : task_runs_structure ,
133
+ "tmp" : {},
133
134
}
134
135
}
135
136
)
Original file line number Diff line number Diff line change 4
4
import unittest
5
5
from pathlib import Path
6
6
7
- from manage .tests .unittest_clean import FilesystemStructure
7
+ from manage .tests .unittest_clean import CleanTests , FilesystemStructure
8
+ from util .workspace import DBGymWorkspace
8
9
9
10
10
11
class WorkspaceTests (unittest .TestCase ):
@@ -25,4 +26,24 @@ def tearDown(self) -> None:
25
26
shutil .rmtree (self .scratchspace_path )
26
27
27
28
def test_workspace_init (self ) -> None :
28
- pass
29
+ starting_structure = FilesystemStructure ({})
30
+ CleanTests .create_structure (self .scratchspace_path , starting_structure )
31
+
32
+ workspace = DBGymWorkspace (self .workspace_path )
33
+ ending_symlinks_structure = FilesystemStructure ({})
34
+ ending_task_runs_structure = FilesystemStructure (
35
+ {
36
+ "latest_run.link" : (
37
+ "symlink" ,
38
+ f"dbgym_workspace/task_runs/{ workspace .dbgym_this_run_path .name } " ,
39
+ ),
40
+ workspace .dbgym_this_run_path .name : {},
41
+ }
42
+ )
43
+ ending_structure = CleanTests .make_workspace_structure (
44
+ ending_symlinks_structure , ending_task_runs_structure
45
+ )
46
+
47
+ self .assertTrue (
48
+ CleanTests .verify_structure (self .scratchspace_path , ending_structure )
49
+ )
You can’t perform that action at this time.
0 commit comments