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
358bfdaa
Commit
358bfdaa
authored
11 years ago
by
Todd Gamblin
Browse files
Options
Downloads
Patches
Plain Diff
Another multimethod test for vdeps
parent
87dc2151
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/spack/spack/test/mock_packages/multimethod.py
+3
-4
3 additions, 4 deletions
lib/spack/spack/test/mock_packages/multimethod.py
lib/spack/spack/test/multimethod.py
+5
-5
5 additions, 5 deletions
lib/spack/spack/test/multimethod.py
with
8 additions
and
9 deletions
lib/spack/spack/test/mock_packages/multimethod.py
+
3
−
4
View file @
358bfdaa
...
@@ -92,10 +92,9 @@ def different_by_dep(self):
...
@@ -92,10 +92,9 @@ def different_by_dep(self):
#
#
# Make sure we can switch on virtual dependencies
# Make sure we can switch on virtual dependencies
#
#
@when
(
'
^mpi@2:
'
)
def
different_by_virtual_dep
(
self
):
def
different_by_virtual_dep
(
self
):
return
'
mpi@2:
'
return
1
@when
(
'
^mpi@:
1
'
)
@when
(
'
^mpi@
2
:
'
)
def
different_by_virtual_dep
(
self
):
def
different_by_virtual_dep
(
self
):
return
'
mpi@:1
'
return
2
This diff is collapsed.
Click to expand it.
lib/spack/spack/test/multimethod.py
+
5
−
5
View file @
358bfdaa
...
@@ -76,9 +76,9 @@ def test_ambiguous_dep(self):
...
@@ -76,9 +76,9 @@ def test_ambiguous_dep(self):
self
.
assertRaises
(
AmbiguousMethodError
,
pkg
.
different_by_dep
)
self
.
assertRaises
(
AmbiguousMethodError
,
pkg
.
different_by_dep
)
def
test_one_dep_match
(
self
):
def
test_virtual_dep_match
(
self
):
pass
pkg
=
packages
.
get
(
'
multimethod^mpich2
'
)
self
.
assertEqual
(
pkg
.
different_by_virtual_dep
(),
2
)
pkg
=
packages
.
get
(
'
multimethod^mpich@1.0
'
)
def
test_one_dep_match
(
self
):
self
.
assertEqual
(
pkg
.
different_by_virtual_dep
(),
1
)
pass
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