[libpeas] Enable all Python property tests



commit 65c5d8400116bfc25de701687c50566c164c4945
Author: Garrett Regier <alias301 gmail com>
Date:   Mon Mar 7 08:03:16 2011 -0800

    Enable all Python property tests

 tests/libpeas/extension-python.c                   |   45 +-------------------
 .../plugins/extension-python/extension-python.py   |   15 ++-----
 2 files changed, 5 insertions(+), 55 deletions(-)
---
diff --git a/tests/libpeas/extension-python.c b/tests/libpeas/extension-python.c
index df95e19..c57fb1d 100644
--- a/tests/libpeas/extension-python.c
+++ b/tests/libpeas/extension-python.c
@@ -25,47 +25,4 @@
 
 #include "testing/testing-extension.h"
 
-/*#define EXTENSION_TESTS("python")*/
-
-int
-main (int   argc,
-      char *argv[])
-{
-  g_test_init (&argc, &argv, NULL);
-
-  g_type_init ();
-
-  testing_init ();
-
-  peas_engine_enable_loader (peas_engine_get_default (), "python");
-  g_object_unref (peas_engine_get_default ());
-
-  testing_extension_set_plugin_ ("extension-" "python");
-
-  _EXTENSION_TEST ("python", "garbage-collect", garbage_collect);
-
-  _EXTENSION_TEST ("python", "provides-valid", provides_valid);
-  _EXTENSION_TEST ("python", "provides-invalid", provides_invalid);
-
-  _EXTENSION_TEST ("python", "create-valid", create_valid);
-  _EXTENSION_TEST ("python", "create-invalid", create_invalid);
-
-  _EXTENSION_TEST ("python", "reload", reload);
-
-  _EXTENSION_TEST ("python", "call-invalid", call_invalid);
-  _EXTENSION_TEST ("python", "call-no-args", call_no_args);
-  _EXTENSION_TEST ("python", "call-with-return", call_with_return);
-  _EXTENSION_TEST ("python", "call-single-arg", call_single_arg);
-  _EXTENSION_TEST ("python", "call-multi-args", call_multi_args);
-
-#ifdef PYTHON_EXTENSION_PROPERTIES_DONT_WORK
-  /* Some tests don't fail when they should */
-
-  _EXTENSION_TEST ("python", "properties-construct-only", properties_construct_only);
-  _EXTENSION_TEST ("python", "properties-read-only", properties_read_only);
-  _EXTENSION_TEST ("python", "properties-write-only", properties_write_only);
-  _EXTENSION_TEST ("python", "properties-readwrite", properties_readwrite);
-#endif
-
-  return testing_run_tests ();
-}
+EXTENSION_TESTS ("python")
diff --git a/tests/libpeas/plugins/extension-python/extension-python.py b/tests/libpeas/plugins/extension-python/extension-python.py
index fc09062..7a49647 100644
--- a/tests/libpeas/plugins/extension-python/extension-python.py
+++ b/tests/libpeas/plugins/extension-python/extension-python.py
@@ -22,17 +22,10 @@ class CallablePythonPlugin(gobject.GObject, Introspection.Callable):
 class PropertiesPythonPlugin(gobject.GObject, Introspection.Properties):
     __gtype_name__ = "PropertiesPythonPlugin"
 
-    construct_only = gobject.property(type=str, #default="construct-only",
-                                      flags=(gobject.PARAM_READWRITE |
-                                             gobject.PARAM_CONSTRUCT_ONLY))
+    construct_only = gobject.property(type=str)
 
-    read_only = gobject.property(type=str, #default="read-only",
-                                 flags=gobject.PARAM_READABLE)
+    read_only = gobject.property(type=str, default="read-only")
                                       
-    write_only = gobject.property(type=str, #default="write-only",
-                                  flags=(gobject.PARAM_WRITABLE |
-                                         gobject.PARAM_CONSTRUCT))
+    write_only = gobject.property(type=str)
 
-    readwrite = gobject.property(type=str, #default="readwrite",
-                                 flags=(gobject.PARAM_READWRITE |
-                                        gobject.PARAM_CONSTRUCT))
+    readwrite = gobject.property(type=str, default="readwrite")



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