Projet

Général

Profil

0011-misc-pylint-fix-unidiomatic-typecheck-52630.patch

Lauréline Guérin, 02 avril 2021 17:21

Télécharger (1,05 ko)

Voir les différences:

Subject: [PATCH 11/18] misc: pylint fix unidiomatic-typecheck (#52630)

 tests/test_misc.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tests/test_misc.py
158 158
def test_json_str_decoder():
159 159
    json_str = json.dumps({'lst': [{'a': 'b'}, 1, 2], 'bla': u'éléphant'})
160 160

  
161
    assert type(list(json_loads(json_str).keys())[0]) is str
162
    assert type(json_loads(json_str)['lst'][0]['a']) is str
163
    assert type(json_loads(json_str)['bla']) is str
161
    assert isinstance(list(json_loads(json_str).keys())[0], str)
162
    assert isinstance(json_loads(json_str)['lst'][0]['a'], str)
163
    assert isinstance(json_loads(json_str)['bla'], str)
164 164
    assert json_loads(json_str)['bla'] == force_str(u'éléphant')
165 165

  
166 166

  
167
-