Exemple #1
0
    def test_gtk(self):
        ns = Namespace("Gtk", "3.0")
        types = ns.get_types()
        ns.parse_docs()

        self.assertEqual(types["GtkWindow"], ["Gtk.Window"])
        self.assertEqual(types["GtkAppChooser"], ["Gtk.AppChooser"])
        self.assertEqual(types["GtkArrowType"], ["Gtk.ArrowType"])
Exemple #2
0
    def test_glib(self):
        ns = Namespace("GLib", "2.0")
        types = ns.get_types()
        ns.parse_docs()

        self.assertEqual(types["GBookmarkFileError"],
                         ["GLib.BookmarkFileError"])

        self.assertEqual(types["G_MININT8"], ["GLib.MININT8"])
Exemple #3
0
    def test_gobject(self):
        ns = Namespace("GObject", "2.0")
        types = ns.get_types()
        ns.parse_docs()

        self.assertEqual(types["GTypeCValue"], ["GObject.TypeCValue"])
        self.assertEqual(types["GBoxed"], ["GObject.GBoxed"])

        self.assertEqual(types["G_MAXSSIZE"], ["GObject.G_MAXSSIZE"])
Exemple #4
0
    def test_soup(self):
        ns = Namespace("Soup", "2.4")
        types = ns.get_types()
        ns.parse_docs()

        self.assertEqual(types["SOUP_STATUS_CANCELLED"],
                         ["Soup.Status.CANCELLED"])

        self.assertEqual(types["SoupContentDecoder"],
                         ["Soup.ContentDecoder"])

        self.assertEqual(types["SoupContentDecoder"],
                         ["Soup.ContentDecoder"])

        self.assertEqual(types["soup_cookie_parse"],
                         [u'Soup.Cookie.parse', u'Soup.cookie_parse'])
Exemple #5
0
 def test_ges(self):
     ns = Namespace("GES", "1.0")
     ns.parse_docs()
     types = ns.get_types()
     self.assertTrue("position" not in types)
Exemple #6
0
    def test_cairo(self):
        ns = Namespace("cairo", "1.0")
        types = ns.get_types()
        ns.parse_docs()

        self.assertEqual(types["cairo_t"], ["cairo.Context"])
Exemple #7
0
    def test_gdk(self):
        ns = Namespace("Gdk", "3.0")
        types = ns.get_types()
        ns.parse_docs()

        self.assertEqual(types["GdkModifierType"], ["Gdk.ModifierType"])
Exemple #8
0
    def test_pango(self):
        ns = Namespace("Pango", "1.0")
        types = ns.get_types()
        ns.parse_docs()

        self.assertEqual(types["pango_break"], "Pango.break_")