File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ def test_pybind11_str_raw_str():
254
254
valid_orig = u"DZ"
255
255
valid_utf8 = valid_orig .encode ("utf-8" )
256
256
valid_cvt = cvt (valid_utf8 )
257
- assert type (valid_cvt ) == type ( u"" ) # Py2 unicode, Py3 str, flake8 compatible
257
+ assert type (valid_cvt ) is unicode if pytest . PY2 else str # noqa: F821
258
258
if pytest .PY2 :
259
259
assert valid_cvt == valid_orig
260
260
else :
@@ -267,7 +267,7 @@ def test_pybind11_str_raw_str():
267
267
assert "invalid start byte" in str (excinfo )
268
268
else :
269
269
malformed_cvt = cvt (malformed_utf8 )
270
- assert type (valid_cvt ) == type ( u"" )
270
+ assert type (malformed_cvt ) is unicode if pytest . PY2 else str # noqa: F821
271
271
assert malformed_cvt == u"b'\\ x80'"
272
272
273
273
You can’t perform that action at this time.
0 commit comments