Skip to content

Commit 1369cc2

Browse files
committed
fixing accident in merge conflict resolution + black reformatting
1 parent 1f46756 commit 1369cc2

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

tests/test_eval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def test_evals(capture):
2323
def test_eval_file():
2424
filename = os.path.join(os.path.dirname(__file__), "test_eval_call.py")
2525
if env.PY2:
26-
filename = filename.decode('utf-8')
26+
filename = filename.decode("utf-8")
2727
assert m.test_eval_file(filename)
2828

2929
assert m.test_eval_file_failure()

tests/test_pytypes.py

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,18 @@ def __repr__(self):
125125
with pytest.raises(UnicodeDecodeError):
126126
m.str_from_object(malformed_utf8)
127127
else:
128-
m.str_from_object(malformed_utf8) is malformed_utf8 # To be fixed; see #2380
128+
m.str_from_object(
129+
malformed_utf8
130+
) is malformed_utf8 # To be fixed; see #2380
129131
with pytest.raises(UnicodeDecodeError):
130132
m.str_from_handle(malformed_utf8)
131133
else:
132134
if hasattr(m, "has_str_non_permissive"):
133135
assert m.str_from_object(malformed_utf8) == "b'\\x80'"
134136
else:
135-
assert m.str_from_object(malformed_utf8) is malformed_utf8 # To be fixed; see #2380
137+
assert (
138+
m.str_from_object(malformed_utf8) is malformed_utf8
139+
) # To be fixed; see #2380
136140
assert m.str_from_handle(malformed_utf8) == "b'\\x80'"
137141

138142

@@ -306,15 +310,6 @@ def test_pybind11_str_raw_str():
306310
valid_orig = u"DZ"
307311
valid_utf8 = valid_orig.encode("utf-8")
308312
valid_cvt = cvt(valid_utf8)
309-
<<<<<<< HEAD
310-
assert type(valid_cvt) == bytes # Probably surprising.
311-
assert valid_cvt == b"\xc7\xb1"
312-
313-
malformed_utf8 = b"\x80"
314-
malformed_cvt = cvt(malformed_utf8)
315-
assert type(malformed_cvt) == bytes # Probably surprising.
316-
assert malformed_cvt == b"\x80"
317-
=======
318313
if hasattr(m, "has_str_non_permissive"):
319314
assert type(valid_cvt) is unicode if env.PY2 else str # noqa: F821
320315
if env.PY2:
@@ -324,7 +319,7 @@ def test_pybind11_str_raw_str():
324319
else:
325320
assert valid_cvt is valid_utf8
326321

327-
malformed_utf8 = b'\x80'
322+
malformed_utf8 = b"\x80"
328323
if hasattr(m, "has_str_non_permissive"):
329324
if env.PY2:
330325
with pytest.raises(UnicodeDecodeError):
@@ -335,7 +330,6 @@ def test_pybind11_str_raw_str():
335330
assert malformed_cvt == u"b'\\x80'"
336331
else:
337332
assert cvt(malformed_utf8) is malformed_utf8
338-
>>>>>>> 58c1719 (Meta PR for Google Patches)
339333

340334

341335
def test_implicit_casting():

0 commit comments

Comments
 (0)