diff Lib/test/test_array.py @ 46388:8d555850f73d legacy-trunk

Remove the test file before writing it in case there is no write permission. This might help fix some of the failures on Windows box(es). It doesn't hurt either way and ensure the tests are a little more self contained (ie have less assumptions).
author Neal Norwitz <nnorwitz@gmail.com>
date Thu, 10 Apr 2008 05:46:39 +0000
parents 1d84bf5f9478
children 1c964ed35ef9
line wrap: on
line diff
--- a/Lib/test/test_array.py	Thu Apr 10 02:48:01 2008 +0000
+++ b/Lib/test/test_array.py	Thu Apr 10 05:46:39 2008 +0000
@@ -163,6 +163,7 @@
         a = array.array(self.typecode, 2*self.example)
         self.assertRaises(TypeError, a.tofile)
         self.assertRaises(TypeError, a.tofile, cStringIO.StringIO())
+        test_support.unlink(test_support.TESTFN)
         f = open(test_support.TESTFN, 'wb')
         try:
             a.tofile(f)