Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
4d14655c
Commit
4d14655c
authored
9 years ago
by
Mark Haines
Browse files
Options
Downloads
Plain Diff
Merge pull request #594 from matrix-org/markjh/coverage
Add a test for TreeCache.__contains__
parents
c43609e0
7641a90c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/metrics/test_metric.py
+3
-0
3 additions, 0 deletions
tests/metrics/test_metric.py
tests/util/test_treecache.py
+6
-0
6 additions, 0 deletions
tests/util/test_treecache.py
with
9 additions
and
0 deletions
tests/metrics/test_metric.py
+
3
−
0
View file @
4d14655c
...
...
@@ -61,6 +61,9 @@ class CounterMetricTestCase(unittest.TestCase):
'
vector{method=
"
PUT
"
} 1
'
,
])
# Check that passing too few values errors
self
.
assertRaises
(
ValueError
,
counter
.
inc
)
class
CallbackMetricTestCase
(
unittest
.
TestCase
):
...
...
This diff is collapsed.
Click to expand it.
tests/util/test_treecache.py
+
6
−
0
View file @
4d14655c
...
...
@@ -77,3 +77,9 @@ class TreeCacheTestCase(unittest.TestCase):
cache
[(
"
b
"
,)]
=
"
B
"
cache
.
clear
()
self
.
assertEquals
(
len
(
cache
),
0
)
def
test_contains
(
self
):
cache
=
TreeCache
()
cache
[(
"
a
"
,)]
=
"
A
"
self
.
assertTrue
((
"
a
"
,)
in
cache
)
self
.
assertFalse
((
"
b
"
,)
in
cache
)
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