This one is easily reproduced locally.
```console
$ brew test tintin </dev/null
Testing tintin
/usr/bin/sandbox-exec -f /tmp/homebrew20171111-21895-1igeu09.sb /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/bin/ruby -W0 -I /usr/local/Homebrew/Library/Homebrew -- /usr/local/Homebrew/Library/Homebrew/test.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/tintin.rb
==> /usr/local/Cellar/tintin/2.01.3/bin/tt++ -G brewtest.bin
tcgetattr: Inappropriate ioctl for device
```
Setting `TERM` does not help, and I did not try to come up with more tricks.
There's always `PTY` as a last resort.