Source

pyyaml / tests / lib3 / test_input_output.py

Diff from to

File tests/lib3/test_input_output.py

             yaml.dump(value, stream, encoding=encoding, allow_unicode=allow_unicode)
             data2 = stream.getvalue()
             data3 = yaml.dump(value, encoding=encoding, allow_unicode=allow_unicode)
+            if encoding is not None:
+                assert isinstance(data3, bytes)
+                data3 = data3.decode(encoding)
             stream = io.BytesIO()
             if encoding is None:
                 try: