Commit 11ea3a8
committed
test: cover
Since the whole point of this type is to have a thread-safe version of
`collections.defaultdict` and not have to check for `'key' in SMWD`
before accessing something, the `__contains__()` method (supporting the
`in` keyword) is never exercised in regular code.
The rest of `SopelMemoryWithDefault` is covered by other test cases for
code that *uses* the type, so I'll just keep this patch small.
Now the only uncovered code in `sopel/tools/memories.py` is for variadic
argument handling that we plan to remove anyway, so 98% is fine for now.SopelMemoryWithDefault.__contains__()
1 parent 3037752 commit 11ea3a8
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
9 | 14 | | |
10 | 15 | | |
11 | 16 | | |
| |||
0 commit comments