Skip to content

Commit 3a4bc98

Browse files
committed
fix broken test_guess_start_dir
1 parent 4bb149d commit 3a4bc98

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/framework/easyblock.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
from easybuild.tools import config
4747
from easybuild.tools.build_log import EasyBuildError
4848
from easybuild.tools.config import get_module_syntax
49-
from easybuild.tools.filetools import copy_dir, copy_file, mkdir, read_file, remove_file, write_file
49+
from easybuild.tools.filetools import change_dir, copy_dir, copy_file, mkdir, read_file, remove_file, write_file
5050
from easybuild.tools.module_generator import module_generator
5151
from easybuild.tools.modules import reset_module_caches
5252
from easybuild.tools.utilities import time2str
@@ -1567,8 +1567,13 @@ def test_guess_start_dir(self):
15671567
test_easyconfigs = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'easyconfigs', 'test_ecs')
15681568
ec = process_easyconfig(os.path.join(test_easyconfigs, 't', 'toy', 'toy-0.0.eb'))[0]
15691569

1570+
cwd = os.getcwd()
1571+
self.assertTrue(os.path.exists(cwd))
1572+
15701573
def check_start_dir(expected_start_dir):
15711574
"""Check start dir."""
1575+
# make sure we're in an existing directory at the start
1576+
change_dir(cwd)
15721577
eb = EasyBlock(ec['ec'])
15731578
eb.silent = True
15741579
eb.cfg['stop'] = 'patch'

0 commit comments

Comments
 (0)