Commit d9e25c78 authored by Murray Cumming's avatar Murray Cumming
Browse files

Python tests: Output any unexpected python error message to std::cerr.

parent a087a34a
......@@ -39,7 +39,10 @@ int main()
//std::cout << "type=" << g_type_name(value.get_value_type()) << std::endl;
//Check that there was no python error:
g_assert(error_message.empty());
if(!error_message.empty()) {
std::cerr << "Unexpected error message: " << error_message << "\n";
return EXIT_FAILURE;
}
//Check that the return value is of the expected type:
g_assert(value.get_value_type() == GDA_TYPE_NUMERIC);
......
......@@ -40,7 +40,10 @@ int main()
//std::cout << "type=" << g_type_name(value.get_value_type()) << std::endl;
//Check that there was no python error:
g_assert(error_message.empty());
if(!error_message.empty()) {
std::cerr << "Unexpected error message: " << error_message << "\n";
return EXIT_FAILURE;
}
//Check that the return value is of the expected type:
g_assert(Glom::Field::get_glom_type_for_gda_type(value.get_value_type()) == result_type);
......
......@@ -7,6 +7,7 @@
#include <glom/libglom/init.h>
#include <glom/python_embed/glom_python.h>
#include <libglom/data_structure/glomconversions.h>
#include <iostream>
void execute_func_with_date_return_value()
{
......@@ -26,6 +27,9 @@ void execute_func_with_date_return_value()
//std::cout << "type=" << g_type_name(value.get_value_type()) << std::endl;
//Check that there was no python error:
if(!error_message.empty()) {
std::cerr << "Unexpected error message: " << error_message << "\n";
}
g_assert(error_message.empty());
//Check that the return value is of the expected type:
......@@ -61,6 +65,9 @@ void execute_func_with_date_input_value()
//std::cout << "type=" << g_type_name(value.get_value_type()) << std::endl;
//Check that there was no python error:
if(!error_message.empty()) {
std::cerr << "Unexpected error message: " << error_message << "\n";
}
g_assert(error_message.empty());
//Check that the return value is of the expected type:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment