Skip to content

Commit eeeb39e

Browse files
authored
add test case for gh#333 (#336)
adds a test case for #333
1 parent 7ce97cb commit eeeb39e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

python/tests/match_object_test.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ def test_get_value_string():
205205
c = StringDictionaryCompiler({"memory_limit_mb": "10"})
206206
c.add("abc", "aaaaa")
207207
c.add("abd", "bbbbb")
208+
c.add("abe", "{}")
208209
with tmp_dictionary(c, "match_object_string.kv") as d:
209210
m = d["abc"]
210211
assert m.value == "aaaaa"
@@ -221,6 +222,10 @@ def test_get_value_string():
221222
)
222223
== "bbbbb"
223224
)
225+
m = d["abe"]
226+
# gh#333: keyvi < 0.6.4 returned a dictionary instead of a string
227+
assert m.value == "{}"
228+
assert isinstance(m.value, str)
224229

225230

226231
def test_matched_string():

0 commit comments

Comments
 (0)