under Cygwin. The attached patch corrects this problem.
I tested this patch under Red Hat Linux 8.0 too.
-import netrc, os, unittest
+import netrc, os, unittest, sys
from test import test_support
TEST_NETRC = """
class NetrcTestCase(unittest.TestCase):
def setUp (self):
- fp = open(temp_filename, 'wt')
+ mode = 'w'
+ if sys.platform not in ['cygwin']:
+ mode += 't'
+ fp = open(temp_filename, mode)
fp.write(TEST_NETRC)
fp.close()
self.netrc = netrc.netrc(temp_filename)