gnucash master: Re-enable python-bindings test this time with a fully corrected python path

Geert Janssens gjanssens at code.gnucash.org
Sun Sep 10 05:58:42 EDT 2017


Updated	 via  https://github.com/Gnucash/gnucash/commit/f0fe1e99 (commit)
	from  https://github.com/Gnucash/gnucash/commit/6e652e82 (commit)



commit f0fe1e9949f6a7cc0b993701622547199b126380
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Sun Sep 10 10:52:41 2017 +0200

    Re-enable python-bindings test this time with a fully corrected python path
    
    The fix was suggested by Rob Gowin.
    In addition, disable some debug output in the python tests suite.

diff --git a/bindings/python/tests/CMakeLists.txt b/bindings/python/tests/CMakeLists.txt
index 3835e3d..76058e4 100644
--- a/bindings/python/tests/CMakeLists.txt
+++ b/bindings/python/tests/CMakeLists.txt
@@ -1,11 +1,11 @@
 
-#IF (WITH_PYTHON)
-#  ADD_TEST(python-bindings ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/runTests.py.in)
-#  SET_PROPERTY(TEST python-bindings PROPERTY ENVIRONMENT
-#    GNC_BUILDDIR=${CMAKE_BINARY_DIR}
-#    PYTHONPATH=${CMAKE_BINARY_DIR}/bindings/python:${CMAKE_BINARY_DIR}/lib/gnucash:${CMAKE_BINARY_DIR}/src/test-core
-#  )
-#ENDIF()
+IF (WITH_PYTHON)
+  ADD_TEST(python-bindings ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/runTests.py.in)
+  SET_PROPERTY(TEST python-bindings PROPERTY ENVIRONMENT
+    GNC_BUILDDIR=${CMAKE_BINARY_DIR}
+    PYTHONPATH=${CMAKE_BINARY_DIR}/bindings/python:${CMAKE_BINARY_DIR}/lib/gnucash:${CMAKE_BINARY_DIR}/common/test-core
+  )
+ENDIF()
 
 SET(test_python_bindings_DATA
         runTests.py.in
diff --git a/bindings/python/tests/test_commodity.py b/bindings/python/tests/test_commodity.py
index c8dabd4..4aa7146 100644
--- a/bindings/python/tests/test_commodity.py
+++ b/bindings/python/tests/test_commodity.py
@@ -18,9 +18,9 @@ class TestCommodity( CommoditySession ):
 
 class TestCommodityNamespace( CommoditySession ):
     def test_namespaces(self):
-        print(self.table.__class__)
+        #print(self.table.__class__)
         namespace_names = self.table.get_namespaces()
-        print(namespace_names)
+        #print(namespace_names)
         self.assertEqual(namespace_names, ['AMEX', 'NYSE', 'NASDAQ', 'EUREX', 'FUND', 'template', 'CURRENCY'])
 
     def test_namespaces_list(self):



Summary of changes:
 bindings/python/tests/CMakeLists.txt    | 14 +++++++-------
 bindings/python/tests/test_commodity.py |  4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)



More information about the gnucash-changes mailing list