[grilo/wip/hadess/net-double-free: 2/2] tests: Add Python GrlNet test




commit c11859c8497e572229996791848fdc0bb5cf2422
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Aug 26 14:42:57 2021 +0200

    tests: Add Python GrlNet test

 tests/python/test_net.py | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
---
diff --git a/tests/python/test_net.py b/tests/python/test_net.py
new file mode 100644
index 00000000..acffff6c
--- /dev/null
+++ b/tests/python/test_net.py
@@ -0,0 +1,20 @@
+#!/usr/bin/python3
+
+import gi
+gi.require_version('GrlNet', '0.3')
+from gi.repository import GrlNet
+from gi.repository import GLib
+
+def check_result(wc, res, loop):
+    loop.quit()
+    [success, contents] = wc.request_finish(res)
+    assert(success == True)
+
+def _init():
+    wc = GrlNet.Wc.new()
+
+    loop = GLib.MainLoop()
+    wc.request_async('https://www.gnome.org/', None, check_result, loop)
+    loop.run()
+
+_init()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]