use symbolic mode composition

This commit is contained in:
Martin A. Brown 2016-03-14 20:05:25 -07:00
parent 04208d1a90
commit bdbccb6823
1 changed files with 2 additions and 1 deletions

View File

@ -130,7 +130,8 @@ class Test_which(unittest.TestCase):
f.close()
notfound = which(f.name)
self.assertIsNone(notfound)
os.chmod(f.name, 0755)
mode = stat.S_IRWXU | stat.S_IRGRP | stat.S_IROTH
os.chmod(f.name, mode)
found = which(f.name)
self.assertEqual(f.name, found)
os.unlink(f.name)