Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eic_tools
Spack
Commits
05b6c3f8
Commit
05b6c3f8
authored
8 years ago
by
Benedikt Hegner
Browse files
Options
Downloads
Patches
Plain Diff
add test for list parameters
parent
6e462abb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/spack/spack/test/config.py
+10
-0
10 additions, 0 deletions
lib/spack/spack/test/config.py
with
10 additions
and
0 deletions
lib/spack/spack/test/config.py
+
10
−
0
View file @
05b6c3f8
...
@@ -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
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment