mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 09:41:07 +00:00
gst-python: Fix unit test for python >= 3.12
unittest.TestCase.assertEquals was marked deprecated since 3.0 and was finally removed in 3.12 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5633>
This commit is contained in:
parent
7c68ef354b
commit
900a9c47be
1 changed files with 6 additions and 3 deletions
|
@ -21,9 +21,9 @@ import sys
|
|||
import overrides_hack
|
||||
overrides_hack
|
||||
from common import TestCase, unittest
|
||||
|
||||
from gi.repository import Gst
|
||||
|
||||
|
||||
class TimeArgsTest(TestCase):
|
||||
def testNoneTime(self):
|
||||
self.assertRaises(TypeError, Gst.TIME_ARGS, None)
|
||||
|
@ -32,10 +32,11 @@ class TimeArgsTest(TestCase):
|
|||
self.assertRaises(TypeError, Gst.TIME_ARGS, "String")
|
||||
|
||||
def testClockTimeNone(self):
|
||||
self.assertEquals(Gst.TIME_ARGS(Gst.CLOCK_TIME_NONE), 'CLOCK_TIME_NONE')
|
||||
self.assertEqual(Gst.TIME_ARGS(Gst.CLOCK_TIME_NONE), 'CLOCK_TIME_NONE')
|
||||
|
||||
def testOneSecond(self):
|
||||
self.assertEquals(Gst.TIME_ARGS(Gst.SECOND), '0:00:01.000000000')
|
||||
self.assertEqual(Gst.TIME_ARGS(Gst.SECOND), '0:00:01.000000000')
|
||||
|
||||
|
||||
class TestNotInitialized(TestCase):
|
||||
def testNotInitialized(self):
|
||||
|
@ -93,6 +94,7 @@ class TestBin(TestCase):
|
|||
Gst.init(None)
|
||||
self.assertEqual(Gst.ElementFactory.make("bin", None).sinkpads, [])
|
||||
|
||||
|
||||
class TestBufferMap(TestCase):
|
||||
|
||||
def test_map_unmap_manual(self):
|
||||
|
@ -112,5 +114,6 @@ class TestBufferMap(TestCase):
|
|||
with self.assertRaises(ValueError):
|
||||
info.data[0]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
Loading…
Reference in a new issue