vendored-meson/meson/test cases/frameworks/7 gnome/resources/resources.py
raw| 1 | #!/usr/bin/env python3 |
| 2 | import os |
| 3 | from gi.repository import Gio |
| 4 | |
| 5 | if __name__ == '__main__': |
| 6 | res = Gio.resource_load(os.path.join('resources', 'simple-resources.gresource')) |
| 7 | Gio.Resource._register(res) |
| 8 | |
| 9 | data = Gio.resources_lookup_data('/com/example/myprog/res1.txt', Gio.ResourceLookupFlags.NONE) |
| 10 | assert data.get_data() == b'This is a resource.\n' |