Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
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
FSL
fslpy
Commits
43296f1f
Commit
43296f1f
authored
6 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
TEST: Unit tests for skipUnchanged.invalidate
parent
e74271e1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_memoize.py
+22
-0
22 additions, 0 deletions
tests/test_memoize.py
with
22 additions
and
0 deletions
tests/test_memoize.py
+
22
−
0
View file @
43296f1f
...
@@ -242,7 +242,29 @@ def test_skipUnchanged():
...
@@ -242,7 +242,29 @@ def test_skipUnchanged():
wrapped
(
'
key4
'
,
np
.
zeros
((
1
,
4
)))
wrapped
(
'
key4
'
,
np
.
zeros
((
1
,
4
)))
assert
timesCalled
[
'
key4
'
]
==
2
assert
timesCalled
[
'
key4
'
]
==
2
timesCalled
[
'
key1
'
]
=
0
timesCalled
[
'
key2
'
]
=
0
timesCalled
[
'
key3
'
]
=
0
wrapped
(
'
key1
'
,
1
)
wrapped
(
'
key2
'
,
2
)
wrapped
(
'
key3
'
,
3
)
assert
timesCalled
[
'
key1
'
]
==
1
assert
timesCalled
[
'
key2
'
]
==
1
assert
timesCalled
[
'
key3
'
]
==
1
wrapped
(
'
key1
'
,
1
)
wrapped
(
'
key2
'
,
2
)
wrapped
(
'
key3
'
,
3
)
assert
timesCalled
[
'
key1
'
]
==
1
assert
timesCalled
[
'
key2
'
]
==
1
assert
timesCalled
[
'
key3
'
]
==
1
wrapped
.
invalidate
()
wrapped
(
'
key1
'
,
1
)
wrapped
(
'
key2
'
,
2
)
wrapped
(
'
key3
'
,
3
)
assert
timesCalled
[
'
key1
'
]
==
2
assert
timesCalled
[
'
key2
'
]
==
2
assert
timesCalled
[
'
key3
'
]
==
2
def
test_Instanceify
():
def
test_Instanceify
():
...
...
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