Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
branfosj authored Aug 8, 2024
1 parent dcbcbeb commit 013e891
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/framework/easyblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -2188,7 +2188,7 @@ def test_parallel(self):

handle, toy_ec2 = tempfile.mkstemp(prefix='easyblock_test_file_', suffix='.eb')
os.close(handle)
write_file(toy_ec2, toytxt + "\nparallel = 123\nmaxparallel = 67")
write_file(toy_ec2, toytxt + "\nparallel = 14\nmaxparallel = 7")

handle, toy_ec3 = tempfile.mkstemp(prefix='easyblock_test_file_', suffix='.eb')
os.close(handle)
Expand All @@ -2207,28 +2207,28 @@ def test_parallel(self):
# both 'parallel' and 'maxparallel' easyconfig parameters specified (no 'parallel' build option)
test_eb = EasyBlock(EasyConfig(toy_ec2))
test_eb.check_readiness_step()
self.assertEqual(test_eb.cfg['parallel'], 67)
self.assertEqual(test_eb.cfg['parallel'], 7)

# make sure 'parallel = False' is not overriden (no 'parallel' build option)
test_eb = EasyBlock(EasyConfig(toy_ec3))
test_eb.check_readiness_step()
self.assertEqual(test_eb.cfg['parallel'], False)

# only 'parallel' build option specified
init_config(build_options={'parallel': '97', 'validate': False})
init_config(build_options={'parallel': '9', 'validate': False})
test_eb = EasyBlock(EasyConfig(toy_ec))
test_eb.check_readiness_step()
self.assertEqual(test_eb.cfg['parallel'], 97)
self.assertEqual(test_eb.cfg['parallel'], 9)

# both 'parallel' build option and easyconfig parameter specified (no 'maxparallel')
test_eb = EasyBlock(EasyConfig(toy_ec1))
test_eb.check_readiness_step()
self.assertEqual(test_eb.cfg['parallel'], 97)
self.assertEqual(test_eb.cfg['parallel'], 9)

# both 'parallel' and 'maxparallel' easyconfig parameters specified + 'parallel' build option
test_eb = EasyBlock(EasyConfig(toy_ec2))
test_eb.check_readiness_step()
self.assertEqual(test_eb.cfg['parallel'], 67)
self.assertEqual(test_eb.cfg['parallel'], 7)

# make sure 'parallel = False' is not overriden (with 'parallel' build option)
test_eb = EasyBlock(EasyConfig(toy_ec3))
Expand Down

0 comments on commit 013e891

Please sign in to comment.