Skip to content
Snippets Groups Projects
Commit 05b6c3f8 authored by Benedikt Hegner's avatar Benedikt Hegner
Browse files

add test for list parameters

parent 6e462abb
Branches
Tags
No related merge requests found
...@@ -72,6 +72,10 @@ ...@@ -72,6 +72,10 @@
} }
} }
# Some Sample repo data
repos_low = [ "/some/path" ]
repos_high = [ "/some/other/path" ]
class ConfigTest(MockPackagesTest): class ConfigTest(MockPackagesTest):
def setUp(self): def setUp(self):
...@@ -95,6 +99,12 @@ def check_config(self, comps, arch, *compiler_names): ...@@ -95,6 +99,12 @@ def check_config(self, comps, arch, *compiler_names):
actual = config[arch][key][c] actual = config[arch][key][c]
self.assertEqual(expected, actual) self.assertEqual(expected, actual)
def test_write_list_in_memory(self):
spack.config.update_config('repos', repos_low, 'test_low_priority')
spack.config.update_config('repos', repos_high, 'test_high_priority')
config = spack.config.get_config('repos')
self.assertEqual(config, repos_high+repos_low)
def test_write_key_in_memory(self): def test_write_key_in_memory(self):
# Write b_comps "on top of" a_comps. # Write b_comps "on top of" a_comps.
spack.config.update_config('compilers', a_comps, 'test_low_priority') spack.config.update_config('compilers', a_comps, 'test_low_priority')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment