Fixed noisy test case for the new boolFlag
diff --git a/bool_test.go b/bool_test.go
index 72a12be..19aa762 100644
--- a/bool_test.go
+++ b/bool_test.go
@@ -5,6 +5,7 @@
 package pflag_test
 
 import (
+	"bytes"
 	"fmt"
 	"strconv"
 	"testing"
@@ -156,6 +157,8 @@
 func TestInvalidValue(t *testing.T) {
 	var tristate triStateValue
 	f := setUpFlagSet(&tristate)
+	var buf bytes.Buffer
+	f.SetOutput(&buf)
 	err := f.Parse([]string{"--tristate=invalid"})
 	if err == nil {
 		t.Fatal("expected an error but did not get any, tristate has value", tristate)