[Minor] Improve the code style in TokenizerManager (#767)

This commit is contained in:
Lianmin Zheng
2024-07-27 05:05:15 -07:00
committed by GitHub
parent 3fdab91912
commit 0736b27020
3 changed files with 60 additions and 37 deletions

View File

@@ -118,7 +118,11 @@ def test_decode_json_regex():
s += "}"
ret = decode_json.run()
js_obj = json.loads(ret["json_output"])
try:
js_obj = json.loads(ret["json_output"])
except json.decoder.JSONDecodeError:
print(ret["json_output"])
raise
assert isinstance(js_obj["name"], str)
assert isinstance(js_obj["population"], int)