示例#1
0
文件: test_debug.py 项目: Readon/pgi
    def test_pprint_class(self):
        # populate cache
        Gtk.Window()

        file_ = StringIO()
        pprint(Gtk.Window, file_)
        docstring = "Gtk.Window(type: Gtk.WindowType) -> Gtk.Window"
        self.assertTrue(docstring in file_.getvalue())
示例#2
0
文件: test_debug.py 项目: tobes/pgi
    def test_pprint_class(self):
        # populate cache
        Gtk.Window()

        file_ = StringIO()
        pprint(Gtk.Window, file_)
        docstring = "Gtk.Window(type: Gtk.WindowType) -> Gtk.Window"
        self.assertTrue(docstring in file_.getvalue())
示例#3
0
文件: test_debug.py 项目: Readon/pgi
 def test_pprint_function(self):
     file_ = StringIO()
     pprint(Gtk.main, file_)
     self.assertTrue("main() -> None" in file_.getvalue())
示例#4
0
 def test_codeblock_print(self):
     f = StringIO()
     a = CodeBlock()
     a.write_line("abc")
     a.pprint(f)
     self.assertEqual(f.getvalue(), "abc\n")
示例#5
0
文件: test_debug.py 项目: tobes/pgi
 def test_pprint_function(self):
     file_ = StringIO()
     pprint(Gtk.main, file_)
     self.assertTrue("main() -> None" in file_.getvalue())