Unconditionally opening the temp file in text mode causes this test to fail under Cygwin. The attached patch corrects this problem.
Unconditionally opening the temp file in text mode causes this test to fail
under Cygwin. The attached patch corrects this problem.

I tested this patch under Red Hat Linux 8.0 too.

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator