Index: trunk/Lib/test/test_posixpath.py =================================================================== --- trunk/Lib/test/test_posixpath.py (revision 72674) +++ trunk/Lib/test/test_posixpath.py (working copy) @@ -1,3 +1,5 @@ +#!/usr/bin/env python + import unittest from test import test_support @@ -297,16 +299,16 @@ # If we don't have links, assume that os.stat() doesn't return resonable # inode information and thus, that samefile() doesn't work if hasattr(os, "symlink"): - if hasattr(os, "symlink"): - os.symlink(test_support.TESTFN + "1", test_support.TESTFN + "2") - self.assertIs( - posixpath.samestat( - os.stat(test_support.TESTFN + "1"), - os.stat(test_support.TESTFN + "2") - ), - True - ) - os.remove(test_support.TESTFN + "2") + os.symlink(test_support.TESTFN + "1", test_support.TESTFN + "2") + self.assertIs( + posixpath.samestat( + os.stat(test_support.TESTFN + "1"), + os.stat(test_support.TESTFN + "2") + ), + True + ) + os.remove(test_support.TESTFN + "2") + f = open(test_support.TESTFN + "2", "wb") f.write("bar") f.close() Property changes on: trunk/Lib/test/test_posixpath.py ___________________________________________________________________ Added: svn:executable + * Index: branches/py3k/Lib/test/test_posixpath.py =================================================================== --- branches/py3k/Lib/test/test_posixpath.py (revision 72674) +++ branches/py3k/Lib/test/test_posixpath.py (working copy) @@ -1,3 +1,5 @@ +#!/usr/bin/env python + import unittest from test import support @@ -363,16 +365,16 @@ # If we don't have links, assume that os.stat() doesn't return resonable # inode information and thus, that samefile() doesn't work if hasattr(os, "symlink"): - if hasattr(os, "symlink"): - os.symlink(support.TESTFN + "1", support.TESTFN + "2") - self.assertIs( - posixpath.samestat( - os.stat(support.TESTFN + "1"), - os.stat(support.TESTFN + "2") - ), - True - ) - os.remove(support.TESTFN + "2") + os.symlink(support.TESTFN + "1", support.TESTFN + "2") + self.assertIs( + posixpath.samestat( + os.stat(support.TESTFN + "1"), + os.stat(support.TESTFN + "2") + ), + True + ) + os.remove(support.TESTFN + "2") + f = open(support.TESTFN + "2", "wb") f.write(b"bar") f.close() Property changes on: branches/py3k/Lib/test/test_posixpath.py ___________________________________________________________________ Added: svn:executable + *