bitmask: Do not use long() directly with python3
authorThibault Saunier <tsaunier@igalia.com>
Thu, 22 Feb 2018 11:05:24 +0000 (08:05 -0300)
committerThibault Saunier <tsaunier@igalia.com>
Thu, 22 Feb 2018 11:05:54 +0000 (08:05 -0300)
It doesn't exist anymore there

gi/overrides/Gst.py
testsuite/test_types.py

index b0a0ad4..07852c6 100644 (file)
@@ -35,6 +35,7 @@ from gi.repository import GLib
 if sys.version_info >= (3, 0):
     _basestring = str
     _callable = lambda c: hasattr(c, '__call__')
+    long = int
 else:
     _basestring = basestring
     _callable = callable
index 5e2241f..593012c 100644 (file)
@@ -396,4 +396,7 @@ class TestBitmask(TestCase):
         Gst.init(None)
 
         r = Gst.Bitmask(1 << 5)
-        self.assertEqual(str(r), '0x20L')
+        if sys.version_info >= (3, 0):
+            self.assertEqual(str(r), '0x20')
+        else:
+            self.assertEqual(str(r), '0x20L')