From b935b0ccf8503de8c087d748ebf298458128631f Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Fri, 6 Dec 2019 15:42:40 +0000 Subject: test: split value_py.test into py2/py3 versions. --- test/CMakeLists.txt | 8 ++++++++ test/baseline/feat-value_py.test | 24 ------------------------ test/baseline/feat-value_py2.test | 24 ++++++++++++++++++++++++ test/baseline/feat-value_py3.test | 24 ++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 24 deletions(-) delete mode 100644 test/baseline/feat-value_py.test create mode 100644 test/baseline/feat-value_py2.test create mode 100644 test/baseline/feat-value_py3.test diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 2baa99ae..3e56d682 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -20,6 +20,14 @@ macro(add_ledger_harness_tests _class) foreach(TestFile ${${_class}_TESTS}) get_filename_component(TestFile_Name ${TestFile} NAME_WE) string(FIND ${TestFile_Name} "_py" TestFile_IsPythonTest) + if ((TestFile_IsPythonTest GREATER -1)) + get_filename_component(TestFile_FullName ${TestFile} NAME) + string(FIND ${TestFile_FullName} "_py.test" TestFile_IsAnyPythonTest) + string(FIND ${TestFile_FullName} "_py${Python_VERSION_MAJOR}.test" TestFile_IsThisPythonTest) + if ((TestFile_IsAnyPythonTest EQUAL -1) AND (TestFile_IsThisPythonTest EQUAL -1)) + continue() + endif() + endif() if ((TestFile_IsPythonTest EQUAL -1) OR HAVE_BOOST_PYTHON) add_test(NAME ${_class}Test_${TestFile_Name} COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/RegressTests.py diff --git a/test/baseline/feat-value_py.test b/test/baseline/feat-value_py.test deleted file mode 100644 index 2f351d2a..00000000 --- a/test/baseline/feat-value_py.test +++ /dev/null @@ -1,24 +0,0 @@ -python - from __future__ import print_function - def print_type(val): - print(type(val), val) - -eval print_type(true) -eval print_type([2010/08/10]) -eval print_type(10) -eval print_type($10.00) -eval print_type($10.00 + CAD 30) -eval print_type("Hello!") -eval print_type(/Hello!/) -;eval print_type((1, 2, 3)) - -test reg - True - 2010-08-10 - 10 - $10.00 - $10.00 -CAD 30 - Hello! - Hello! -end test diff --git a/test/baseline/feat-value_py2.test b/test/baseline/feat-value_py2.test new file mode 100644 index 00000000..2f351d2a --- /dev/null +++ b/test/baseline/feat-value_py2.test @@ -0,0 +1,24 @@ +python + from __future__ import print_function + def print_type(val): + print(type(val), val) + +eval print_type(true) +eval print_type([2010/08/10]) +eval print_type(10) +eval print_type($10.00) +eval print_type($10.00 + CAD 30) +eval print_type("Hello!") +eval print_type(/Hello!/) +;eval print_type((1, 2, 3)) + +test reg + True + 2010-08-10 + 10 + $10.00 + $10.00 +CAD 30 + Hello! + Hello! +end test diff --git a/test/baseline/feat-value_py3.test b/test/baseline/feat-value_py3.test new file mode 100644 index 00000000..be7612e1 --- /dev/null +++ b/test/baseline/feat-value_py3.test @@ -0,0 +1,24 @@ +python + from __future__ import print_function + def print_type(val): + print(type(val), val) + +eval print_type(true) +eval print_type([2010/08/10]) +eval print_type(10) +eval print_type($10.00) +eval print_type($10.00 + CAD 30) +eval print_type("Hello!") +eval print_type(/Hello!/) +;eval print_type((1, 2, 3)) + +test reg + True + 2010-08-10 + 10 + $10.00 + $10.00 +CAD 30 + Hello! + Hello! +end test -- cgit v1.2.3