Example #1
0
    def test_pango(self):
        repo = Repository("Pango", "1.0")

        self.assertTrue(
            repo.lookup_parameter_docs("Pango.extents_to_pixels.inclusive"))

        self.assertTrue(repo.lookup_parameter_docs("Pango.break_.text"))

        self.assertTrue(
            repo.lookup_parameter_docs("Pango.TabArray.new.initial_size"))

        self.assertTrue(repo.is_private("Pango.RendererPrivate"))
        self.assertFalse(repo.is_private("Pango.AttrIterator"))
Example #2
0
    def test_pango(self):
        repo = Repository("Pango", "1.0")

        self.assertTrue(
            repo.lookup_parameter_docs("Pango.extents_to_pixels.inclusive"))

        self.assertTrue(
            repo.lookup_parameter_docs("Pango.break_.text"))

        self.assertTrue(
            repo.lookup_parameter_docs("Pango.TabArray.new.initial_size"))

        self.assertTrue(repo.is_private("Pango.RendererPrivate"))
        self.assertFalse(repo.is_private("Pango.AttrIterator"))
Example #3
0
    def test_gio(self):
        repo = Repository("Gio", "2.0")

        method = repo.lookup_attr_docs("Gio.Application.activate")
        signal = repo.lookup_signal_docs("Gio.Application.activate")

        self.assertTrue(method)
        self.assertTrue(signal)
        self.assertNotEqual(method, signal)

        self.assertFalse(
            repo.lookup_parameter_docs(
                "Gio.Application.command-line.command_line"))

        self.assertTrue(
            repo.lookup_parameter_docs(
                "Gio.Application.command-line.command_line", signal=True))
Example #4
0
    def test_gio(self):
        repo = Repository("Gio", "2.0")

        method = repo.lookup_attr_docs("Gio.Application.activate")
        signal = repo.lookup_signal_docs("Gio.Application.activate")

        self.assertTrue(method)
        self.assertTrue(signal)
        self.assertNotEqual(method, signal)

        self.assertFalse(
            repo.lookup_parameter_docs(
                "Gio.Application.command-line.command_line"))

        self.assertTrue(
            repo.lookup_parameter_docs(
                "Gio.Application.command-line.command_line", signal=True))
Example #5
0
    def test_glib_shadowed(self):
        repo = Repository("GLib", "2.0")

        # GLib.io_add_watch points to g_io_add_watch_full and should
        # also use its docs

        self.assertTrue(
            repo.lookup_parameter_docs("GLib.io_add_watch.priority"))

        self.assertTrue(
            "priority" in repo.lookup_attr_docs("GLib.io_add_watch"))

        # we include a note containing the shadowed docs
        self.assertTrue(
            ".. note::" in repo.lookup_attr_docs("GLib.io_add_watch"))
Example #6
0
    def test_glib_shadowed(self):
        repo = Repository("GLib", "2.0")

        # GLib.io_add_watch points to g_io_add_watch_full and should
        # also use its docs

        self.assertTrue(
            repo.lookup_parameter_docs("GLib.io_add_watch.priority"))

        self.assertTrue(
            "priority" in repo.lookup_attr_docs("GLib.io_add_watch"))

        # we include a note containing the shadowed docs
        self.assertTrue(
            ".. note::" in repo.lookup_attr_docs("GLib.io_add_watch"))