mirror of
https://github.com/KLayout/klayout.git
synced 2026-08-29 17:30:09 +02:00
Issue 771 (#773)
* Fixed the issue - Byte array variant was not properly converted to Python/Ruby objects. * Added tests + properly converting byte arrays to byte array variants in Python.
This commit is contained in:
Vendored
+10
@@ -629,6 +629,16 @@ class QtBindingTest(unittest.TestCase):
|
||||
self.assertEqual(len(buf.data) > 100, True)
|
||||
self.assertEqual(buf.data[0:8], b'\x89PNG\r\n\x1a\n')
|
||||
|
||||
def test_53(self):
|
||||
|
||||
# issue #771 (QMimeData not working)
|
||||
mimeData = pya.QMimeData()
|
||||
mimeData.setData("application/json",'{"test":"test"}')
|
||||
jsonData = mimeData.data("application/json");
|
||||
if sys.version_info < (3, 0):
|
||||
self.assertEqual(str(jsonData), '{"test":"test"}')
|
||||
else:
|
||||
self.assertEqual(str(jsonData), 'b\'{"test":"test"}\'')
|
||||
|
||||
# run unit tests
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user