-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from kamo-naoyuki/nttcslab-sp
Add option of "max_cache_fd"
- Loading branch information
Showing
4 changed files
with
83 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# coding: utf-8 | ||
from __future__ import unicode_literals | ||
|
||
from kaldiio.utils import LimitedSizeDict | ||
|
||
|
||
def test_limted_size_dict(): | ||
d = LimitedSizeDict(3) | ||
d["foo"] = 1 | ||
d["bar"] = 2 | ||
d["baz"] = 3 | ||
|
||
assert "foo" in d | ||
assert "bar" in d | ||
assert "baz" in d | ||
|
||
d["foo2"] = 4 | ||
assert "foo" not in d | ||
assert "foo2" in d | ||
|
||
d["bar2"] = 4 | ||
assert "bar" not in d | ||
assert "bar2" in d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters