[Python-checkins] r73905 - python/trunk/Lib/test/test_import.py

r.david.murray python-checkins at python.org
Thu Jul 9 15:55:44 CEST 2009


Author: r.david.murray
Date: Thu Jul 9 15:55:44 2009
New Revision: 73905
Log:
Specify umask in execute bit test to get consistent results
and make sure we test resetting all three execute bits.
Modified:
 python/trunk/Lib/test/test_import.py
Modified: python/trunk/Lib/test/test_import.py
==============================================================================
--- python/trunk/Lib/test/test_import.py	(original)
+++ python/trunk/Lib/test/test_import.py	Thu Jul 9 15:55:44 2009
@@ -97,6 +97,7 @@
 def test_execute_bit_not_copied(self):
 # Issue 6070: under posix .pyc files got their execute bit set if
 # the .py file had the execute bit set, but they aren't executable.
+ oldmask = os.umask(022)
 try:
 fname = TESTFN + os.extsep + "py"
 f = open(fname, 'w').close()
@@ -112,6 +113,7 @@
 self.assertEquals(stat.S_IMODE(s.st_mode),
 stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH)
 finally:
+ os.umask(oldmask)
 remove_files(TESTFN)
 if TESTFN in sys.modules: del sys.modules[TESTFN]
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /