misc: pylint fix unidiomatic-typecheck (#52630)
This commit is contained in:
parent
43807dadcd
commit
5c49177e48
|
@ -158,9 +158,9 @@ def test_simplify_mix():
|
|||
def test_json_str_decoder():
|
||||
json_str = json.dumps({'lst': [{'a': 'b'}, 1, 2], 'bla': u'éléphant'})
|
||||
|
||||
assert type(list(json_loads(json_str).keys())[0]) is str
|
||||
assert type(json_loads(json_str)['lst'][0]['a']) is str
|
||||
assert type(json_loads(json_str)['bla']) is str
|
||||
assert isinstance(list(json_loads(json_str).keys())[0], str)
|
||||
assert isinstance(json_loads(json_str)['lst'][0]['a'], str)
|
||||
assert isinstance(json_loads(json_str)['bla'], str)
|
||||
assert json_loads(json_str)['bla'] == force_str(u'éléphant')
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue