##// END OF EJS Templates
tests: update test-inherit-mode to pass our import checker
Augie Fackler -
r33991:266192d4 default
parent child Browse files
Show More
@@ -10,7 +10,9 b' just in case somebody has a strange $TMP'
10 10 $ cd dir
11 11
12 12 $ cat >printmodes.py <<EOF
13 > import os, sys
13 > from __future__ import absolute_import, print_function
14 > import os
15 > import sys
14 16 >
15 17 > allnames = []
16 18 > isdir = {}
@@ -25,12 +27,13 b' just in case somebody has a strange $TMP'
25 27 > allnames.sort()
26 28 > for name in allnames:
27 29 > suffix = name in isdir and '/' or ''
28 > print('%05o %s%s' % (os.lstat(name).st_mode & 07777, name, suffix))
30 > print('%05o %s%s' % (os.lstat(name).st_mode & 0o7777, name, suffix))
29 31 > EOF
30 32
31 33 $ cat >mode.py <<EOF
34 > from __future__ import absolute_import, print_function
35 > import os
32 36 > import sys
33 > import os
34 37 > print('%05o' % os.lstat(sys.argv[1]).st_mode)
35 38 > EOF
36 39
General Comments 0
You need to be logged in to leave comments. Login now