python test failures caused by error checks not filtering JAVA_TOOL_OPTIONS

patch by David Capwell; reviewed by Benjamin Lerer for CASSANDRA-16660
diff --git a/cqlsh_tests/test_cqlsh.py b/cqlsh_tests/test_cqlsh.py
index fa1edad..85333d5 100644
--- a/cqlsh_tests/test_cqlsh.py
+++ b/cqlsh_tests/test_cqlsh.py
@@ -140,11 +140,14 @@
 
         logger.debug(cmds)
 
+        # 3.7 adds a text=True option which converts stdout/stderr to str type, until then
+        # when printing out need to convert in order to avoid assert failing as the type
+        # does not have an encoding
         p = subprocess.Popen(cmds, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
         stdout, stderr = p.communicate()
 
-        assert 0 == len(stdout), stdout
-        assert 0 == len(stderr), stderr
+        assert 0 == len(stdout), str(stdout)
+        assert 0 == len(stderr), str(stderr)
 
     def test_simple_insert(self):
 
diff --git a/gossip_test.py b/gossip_test.py
index dd8dbef..0034324 100644
--- a/gossip_test.py
+++ b/gossip_test.py
@@ -4,6 +4,7 @@
 
 from dtest import Tester
 from tools.misc import new_node
+from tools.assertions import assert_stderr_clean
 
 since = pytest.mark.since
 logger = logging.getLogger(__name__)
@@ -40,7 +41,7 @@
 
         logger.debug("Assassinating unknown node 11.1.1.1")
         out, err, _ = node1.nodetool("assassinate 11.1.1.1")
-        assert len(err.strip()) <= 0, "nodetool command failed: {}".format(err)
+        assert_stderr_clean(err)
 
         logger.debug("Starting node {}".format(node3.address()))
         node3.start()
@@ -70,7 +71,7 @@
         assassination_target = non_seed_nodes[0]
         logger.debug("Assassinating non-seed node {}".format(assassination_target.address()))
         out, err, _ = node1.nodetool("assassinate {}".format(assassination_target.address()))
-        assert len(err.strip()) <= 0, "nodetool command failed: {}".format(err)
+        assert_stderr_clean(err)
 
         logger.debug("Starting non-seed nodes")
         for node in non_seed_nodes: