Fix various test failures due to the python test rewrite.
* Install python3, python3-nose2, python3-sh on OSX in Travis CI
* Escape a backslash in tests/CMakeLists.txt, the CMake in Ubuntu 16.04 is ok with it but older versions of CMake fail at configure time.
* Remove a memory leak in a test committed by mistake
* Remove an obsolete import in the BUILD file for test (this caused an error when testing with Bazel).
diff --git a/extras/scripts/travis_ci_install_osx.sh b/extras/scripts/travis_ci_install_osx.sh
index 4447f01..2277879 100755
--- a/extras/scripts/travis_ci_install_osx.sh
+++ b/extras/scripts/travis_ci_install_osx.sh
@@ -34,3 +34,7 @@
 clang-3.7)     install_brew_package homebrew/versions/llvm37 --with-clang --with-libcxx;;
 *) echo "Compiler not supported: ${COMPILER}. See travis_ci_install_osx.sh"; exit 1 ;;
 esac
+
+brew install python3
+pip3 install nose2
+pip3 install sh
diff --git a/tests/BUILD b/tests/BUILD
index de03d58..fd8f500 100644
--- a/tests/BUILD
+++ b/tests/BUILD
@@ -1,6 +1,4 @@
 
-load(":test_lists.bzl", "TEST_LISTS")
-
 cc_library(
     name = "test_macros",
     srcs = [],
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 60de88c..ea0390e 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -107,7 +107,7 @@
              COMMAND bash -c "
                 unset PYTHONPATH
                 unset PYTHONHOME
-                cp ${CMAKE_CURRENT_SOURCE_DIR}/${TEST_SOURCE} ${CMAKE_CURRENT_BINARY_DIR} && \
+                cp ${CMAKE_CURRENT_SOURCE_DIR}/${TEST_SOURCE} ${CMAKE_CURRENT_BINARY_DIR} && \\
                 ./${TEST_SOURCE}")
     set_tests_properties(${NAME} PROPERTIES DEPENDS fruitlib-compile)
   endforeach()
diff --git a/tests/test_register_factory.py b/tests/test_register_factory.py
index e47263f..bdf2378 100755
--- a/tests/test_register_factory.py
+++ b/tests/test_register_factory.py
@@ -93,7 +93,6 @@
   std::unique_ptr<Scaler> scaler = scalerFactory(12.1);
   std::cout << scaler->scale(3) << std::endl;
 
-  new int(5);
   return 0;
 }
 ''')