(self)
| 105 | info.data[0] |
| 106 | |
| 107 | def test_map_unmap_context(self): |
| 108 | Gst.init(None) |
| 109 | buf = Gst.Buffer.new_wrapped([42]) |
| 110 | with buf.map(Gst.MapFlags.READ | Gst.MapFlags.WRITE) as info: |
| 111 | self.assertEqual(info.data[0], 42) |
| 112 | with self.assertRaises(ValueError): |
| 113 | info.data[0] |
| 114 | |
| 115 | if __name__ == "__main__": |
| 116 | unittest.main() |