diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/test/config.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/spack/spack/test/config.py b/lib/spack/spack/test/config.py index 3977f0e7d4..ed0797a541 100644 --- a/lib/spack/spack/test/config.py +++ b/lib/spack/spack/test/config.py @@ -72,6 +72,10 @@ b_comps = { } } +# Some Sample repo data +repos_low = [ "/some/path" ] +repos_high = [ "/some/other/path" ] + class ConfigTest(MockPackagesTest): def setUp(self): @@ -95,6 +99,12 @@ class ConfigTest(MockPackagesTest): actual = config[arch][key][c] 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): # Write b_comps "on top of" a_comps. spack.config.update_config('compilers', a_comps, 'test_low_priority') |