Skip to content

Commit 6938ad1

Browse files
committed
Yet another fix to tests
1 parent c68f792 commit 6938ad1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/framework/easyblock.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,11 +1334,11 @@ def test_make_module_step(self):
13341334
self.assertTrue(regex.search(txt), "Pattern %s found in %s" % (regex.pattern, txt))
13351335

13361336
for (key, vals) in modextrapaths.items():
1337-
if isinstance(vals, str):
1338-
vals = [vals]
13391337
if isinstance(vals, dict):
13401338
delim = vals['delimiter']
13411339
paths = vals['paths']
1340+
if isinstance(paths, str):
1341+
paths = [paths]
13421342

13431343
for val in paths:
13441344
if get_module_syntax() == 'Tcl':
@@ -1352,6 +1352,9 @@ def test_make_module_step(self):
13521352
num_prepends = len(regex.findall(txt))
13531353
self.assertEqual(num_prepends, 1, "Expected exactly 1 %s command in %s" % (regex.pattern, txt))
13541354
else:
1355+
if isinstance(vals, str):
1356+
vals = [vals]
1357+
13551358
for val in vals:
13561359
if get_module_syntax() == 'Tcl':
13571360
regex = re.compile(fr'^prepend-path\s+{key}\s+\$root/{val}$', re.M)

0 commit comments

Comments
 (0)