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.
This commit is contained in:
Geert Janssens
2017-09-10 10:52:41 +02:00
parent 6e652e82ad
commit f0fe1e9949
2 changed files with 9 additions and 9 deletions

View File

@@ -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

View File

@@ -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):