test.py: centralize the determining whether stdout is a tty
test.py: centralize the determining whether stdout is a tty

Currently test.py has three different places it checks whether stdout is
a tty. This patch centralizes these into a single global variable. This
ensures consistency and makes it easier to override it later with a
command-line switch, should we want to.

Signed-off-by: Botond Dénes <a584fa4d75a0a85d721f44fb6e06315a2853b0b6@scylladb.com>
Message-Id: <20200529101124.123925-1-a584fa4d75a0a85d721f44fb6e06315a2853b0b6@scylladb.com>

avikivity/scylla,avikivity/scylla,avikivity/scylla,scylladb/scylla,scylladb/scylla,scylladb/scylla,scylladb/scylla