| 54 | Gst.ElementFactory.make("identity", None) |
| 55 | |
| 56 | def testNotDeinitialized(self): |
| 57 | Gst.init(None) |
| 58 | |
| 59 | assert(Gst.Caps.from_string("audio/x-raw")) |
| 60 | assert(Gst.Structure.from_string("audio/x-raw")) |
| 61 | assert(Gst.ElementFactory.make("identity", None)) |
| 62 | |
| 63 | Gst.deinit() |
| 64 | if sys.version_info >= (3, 0): |
| 65 | assert_type = Gst.NotInitialized |
| 66 | else: |
| 67 | assert_type = TypeError |
| 68 | |
| 69 | with self.assertRaises(assert_type): |
| 70 | Gst.Caps.from_string("audio/x-raw") |
| 71 | |
| 72 | with self.assertRaises(assert_type): |
| 73 | Gst.Structure.from_string("audio/x-raw") |
| 74 | |
| 75 | with self.assertRaises(assert_type): |
| 76 | Gst.ElementFactory.make("identity", None) |
| 77 | |
| 78 | |
| 79 | class TestStructure(TestCase): |