tests: update test-inherit-mode to pass our import checker
authorAugie Fackler <raf@durin42.com>
Tue, 22 Aug 2017 17:15:09 -0400
changeset 33989 266192d4666b
parent 33988 afb33e73e515
child 33990 b4707311d982
tests: update test-inherit-mode to pass our import checker
tests/test-inherit-mode.t
--- a/tests/test-inherit-mode.t	Tue Aug 22 17:11:30 2017 -0400
+++ b/tests/test-inherit-mode.t	Tue Aug 22 17:15:09 2017 -0400
@@ -10,7 +10,9 @@
   $ cd dir
 
   $ cat >printmodes.py <<EOF
-  > import os, sys
+  > from __future__ import absolute_import, print_function
+  > import os
+  > import sys
   > 
   > allnames = []
   > isdir = {}
@@ -25,12 +27,13 @@
   > allnames.sort()
   > for name in allnames:
   >     suffix = name in isdir and '/' or ''
-  >     print('%05o %s%s' % (os.lstat(name).st_mode & 07777, name, suffix))
+  >     print('%05o %s%s' % (os.lstat(name).st_mode & 0o7777, name, suffix))
   > EOF
 
   $ cat >mode.py <<EOF
+  > from __future__ import absolute_import, print_function
+  > import os
   > import sys
-  > import os
   > print('%05o' % os.lstat(sys.argv[1]).st_mode)
   > EOF