summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Hegner <hegner@cern.ch>2016-05-11 00:14:24 +0200
committerBenedikt Hegner <hegner@cern.ch>2016-05-11 00:14:24 +0200
commit05b6c3f8cfd065dcf4173613a64ed94fa1815d31 (patch)
tree135700d76dfd0db4a7fce745a91a0c21769c683f
parent6e462abb4d208584cb5f984f2f4c177bcec37dd4 (diff)
downloadspack-05b6c3f8cfd065dcf4173613a64ed94fa1815d31.tar.gz
spack-05b6c3f8cfd065dcf4173613a64ed94fa1815d31.tar.bz2
spack-05b6c3f8cfd065dcf4173613a64ed94fa1815d31.tar.xz
spack-05b6c3f8cfd065dcf4173613a64ed94fa1815d31.zip
add test for list parameters
-rw-r--r--lib/spack/spack/test/config.py10
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')