tp: fix python test runner not returning errors on failure

Change-Id: I1eed2d0a76ac2f0c3ddde550336fcb2c1bd18370
diff --git a/tools/run_python_api_tests.py b/tools/run_python_api_tests.py
index 390c13d..f468896 100755
--- a/tools/run_python_api_tests.py
+++ b/tools/run_python_api_tests.py
@@ -47,6 +47,8 @@
   runner = unittest.TextTestRunner(verbosity=3)
   result = runner.run(suite)
 
+  return 0 if result.wasSuccessful() else 1
+
 
 if __name__ == '__main__':
   sys.exit(main())