Added a PySide derived test library.

The test library is intended to provide specific test cases in a way
that problems could be isolated easier than using the ones provided by
the Qt library. Cases commons to all Python bindings must go into the
Shiboken test libraries, the one added here is intended to test Qt
specifics (e.g. signals).

A Python unit test was added for the case when a method and a signal
have the same name.
This commit is contained in:
Marcelo Lira 2010-10-05 16:10:50 -03:00
commit 4b3b56acd7
9 changed files with 1694 additions and 5 deletions

View file

@ -6,8 +6,8 @@ else()
endif()
if(WIN32)
set(TEST_PYTHONPATH "${CMAKE_BINARY_DIR};${CMAKE_SOURCE_DIR}/tests/util")
set(TEST_LIBRARY_PATH "${libpyside_BINARY_DIR};$ENV{PATH}")
set(TEST_PYTHONPATH "${CMAKE_BINARY_DIR};${CMAKE_SOURCE_DIR}/tests/util;${testbinding_BINARY_DIR}")
set(TEST_LIBRARY_PATH "${libpyside_BINARY_DIR};${pysidetest_BINARY_DIR};$ENV{PATH}")
set(LIBRARY_PATH_VAR "PATH")
string(REPLACE "\\" "/" TEST_PYTHONPATH "${TEST_PYTHONPATH}")
string(REPLACE "\\" "/" TEST_LIBRARY_PATH "${TEST_LIBRARY_PATH}")
@ -15,8 +15,8 @@ else()
string(REPLACE ";" "\\;" TEST_PYTHONPATH "${TEST_PYTHONPATH}")
string(REPLACE ";" "\\;" TEST_LIBRARY_PATH "${TEST_LIBRARY_PATH}")
else()
set(TEST_PYTHONPATH "${CMAKE_BINARY_DIR}:${CMAKE_SOURCE_DIR}/tests/util")
set(TEST_LIBRARY_PATH "${libpyside_BINARY_DIR}:$ENV{LD_LIBRARY_PATH}")
set(TEST_PYTHONPATH "${CMAKE_BINARY_DIR}:${CMAKE_SOURCE_DIR}/tests/util:${testbinding_BINARY_DIR}")
set(TEST_LIBRARY_PATH "${libpyside_BINARY_DIR}:${pysidetest_BINARY_DIR}:$ENV{LD_LIBRARY_PATH}")
set(LIBRARY_PATH_VAR "LD_LIBRARY_PATH")
endif()
@ -35,7 +35,7 @@ else()
elseif(${ARGC} EQUAL 2)
set(EXPECT_TO_FAIL ${ARGV1})
else()
message(WARNING "Ivalid call of macro PYSIDE_TEST")
message(WARNING "Invalid call of macro PYSIDE_TEST")
endif()
set(TEST_CMD ${XVFB_EXEC} ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/${ARGV0}")
add_test(${TEST_NAME} ${TEST_CMD})
@ -59,6 +59,7 @@ else()
endif ()
add_subdirectory(signals)
add_subdirectory(pysidetest)
TEST_QT_MODULE(QT_QTCORE_FOUND QtCore)
TEST_QT_MODULE(QT_QTGUI_FOUND QtGui)
TEST_QT_MODULE(QT_QTNETWORK_FOUND QtNetwork)