https://www.illumos.org/issues/1182 --- pygobject-3.50.0/tests/test_iochannel.py.orig +++ pygobject-3.50.0/tests/test_iochannel.py @@ -54,8 +54,8 @@ def test_file_readline_latin1(self): ch = GLib.IOChannel(filename=self.testlatin1, mode='r') - ch.set_encoding('latin1') - self.assertEqual(ch.get_encoding(), 'latin1') + ch.set_encoding('iso-8859-1') + self.assertEqual(ch.get_encoding(), 'iso-8859-1') self.assertEqual(ch.readline(), 'hellø world\n') self.assertEqual(ch.readline(), 'second line\n') self.assertEqual(ch.readline(), '\n') @@ -117,16 +117,16 @@ def test_file_write(self): ch = GLib.IOChannel(filename=self.testout, mode='w') - ch.set_encoding('latin1') + ch.set_encoding('iso-8859-1') ch.write('hellø world\n') ch.shutdown(True) ch = GLib.IOChannel(filename=self.testout, mode='a') - ch.set_encoding('latin1') + ch.set_encoding('iso-8859-1') ch.write('À demain!') ch.shutdown(True) with open(self.testout, 'rb') as f: - self.assertEqual(f.read().decode('latin1'), u'hellø world\nÀ demain!') + self.assertEqual(f.read().decode('iso-8859-1'), u'hellø world\nÀ demain!') def test_file_writelines(self): ch = GLib.IOChannel(filename=self.testout, mode='w')