[glom] Fix a test.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Fix a test.
- Date: Mon, 11 Apr 2011 09:10:18 +0000 (UTC)
commit fcf26fad7dc198ab9343050fe66a2dd90b744f17
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Apr 11 11:10:06 2011 +0200
Fix a test.
* tests/python/test_python_execute_func_bad_syntax.cc:
Allow the result to be a null Gda::Value, because that is acceptable for a
python script with invalid syntax.
ChangeLog | 20 ++++++++++++++------
.../python/test_python_execute_func_bad_syntax.cc | 4 +++-
2 files changed, 17 insertions(+), 7 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 356d21d..c799834 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,17 @@
+2011-04-11 Murray Cumming <murrayc murrayc com>
+
+ Fix a test.
+
+ * tests/python/test_python_execute_func_bad_syntax.cc:
+ Allow the result to be a null Gda::Value, because that is acceptable for a
+ python script with invalid syntax.
+
2011-04-08 Murray Cumming <murrayc murrayc com>
Port the debian repository analyzer script example to GTK+ 3.
* examples/example_scripts/repository_analyzer_begin_scan.py:
- Use PyGObject+Introspection instead of pygtk, and adapt for a minidom API
+ Use PyGObject+Introspection instead of pygtk, and adapt for a minidom API
change.
This is also here:
https://gitorious.org/debian_repository_analyzer
@@ -12,13 +20,13 @@
Fix use of bool python return types.
- * glom/libglom/python_embed/pygdavalue_conversions.cc:
- glom_pygda_value_from_pyobject(): Use the C Py*_Check() functions because
- boost::python::extract<>::check() does not really check for the exact type
+ * glom/libglom/python_embed/pygdavalue_conversions.cc:
+ glom_pygda_value_from_pyobject(): Use the C Py*_Check() functions because
+ boost::python::extract<>::check() does not really check for the exact type
and has no way to do that. Previously we were interpreting bools as ints.
- Note also that the order fo the Py*_Check() checks is important, because
+ Note also that the order fo the Py*_Check() checks is important, because
python considers bool to be derived from int.
- * tests/python/test_python_execute_func_with_record.cc: Uncomment the checks
+ * tests/python/test_python_execute_func_with_record.cc: Uncomment the checks
for the return type and value now that it works.
2011-04-07 Murray Cumming <murrayc murrayc com>
diff --git a/tests/python/test_python_execute_func_bad_syntax.cc b/tests/python/test_python_execute_func_bad_syntax.cc
index 152b2dc..ee7a031 100644
--- a/tests/python/test_python_execute_func_bad_syntax.cc
+++ b/tests/python/test_python_execute_func_bad_syntax.cc
@@ -45,7 +45,9 @@ int main()
g_assert(!error_message.empty());
//Check that the return value is of the expected type:
- g_assert(value.get_value_type() == GDA_TYPE_NUMERIC);
+ g_assert(
+ (value.get_value_type() == GDA_TYPE_NUMERIC) ||
+ value.is_null() );
//Check that the return value is of the expected value:
const double numeric = Glom::Conversions::get_double_for_gda_value_numeric(value);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]