@@ -220,9 +220,9 @@ def test_workspace_dirs(tmpdir, mutable_mock_workspace_path):
220
220
# it would be expected
221
221
wsdir1 = os .path .join (os .getcwd (), 'ws1' )
222
222
os .makedirs (wsdir1 )
223
- ramble .workspace . set_workspace_path ( wsdir1 )
224
- workspace ('create' , 'test1' )
225
- out = workspace ('list' )
223
+ with ramble .config . override ( 'config:workspace_dirs' , wsdir1 ):
224
+ workspace ('create' , 'test1' )
225
+ out = workspace ('list' )
226
226
assert 'test1' in out
227
227
228
228
# Now make a second temp directory,
@@ -232,17 +232,12 @@ def test_workspace_dirs(tmpdir, mutable_mock_workspace_path):
232
232
# second is
233
233
wsdir2 = os .path .join (os .getcwd (), 'ws2' )
234
234
os .makedirs (wsdir2 )
235
- ramble .workspace . set_workspace_path ( wsdir2 )
236
- workspace ('create' , 'test2' )
237
- out = workspace ('list' )
235
+ with ramble .config . override ( 'config:workspace_dirs' , wsdir2 ):
236
+ workspace ('create' , 'test2' )
237
+ out = workspace ('list' )
238
238
assert 'test2' in out
239
239
assert 'test1' not in out
240
240
241
- # Cleanup after test
242
- workspace ('remove' , '-y' , 'test2' )
243
- ramble .workspace .set_workspace_path (wsdir1 )
244
- workspace ('remove' , '-y' , 'test1' )
245
-
246
241
247
242
def test_remove_workspace (capfd ):
248
243
workspace ('create' , 'foo' )
0 commit comments