# HG changeset patch # User Augie Fackler # Date 2017-08-22 21:15:09 # Node ID 266192d4666b71f9689ca4fe34bfb67bc859ece1 # Parent afb33e73e51525235c12b7fb930823e71201f9fc tests: update test-inherit-mode to pass our import checker diff --git a/tests/test-inherit-mode.t b/tests/test-inherit-mode.t --- a/tests/test-inherit-mode.t +++ b/tests/test-inherit-mode.t @@ -10,7 +10,9 @@ just in case somebody has a strange $TMP $ cd dir $ cat >printmodes.py < import os, sys + > from __future__ import absolute_import, print_function + > import os + > import sys > > allnames = [] > isdir = {} @@ -25,12 +27,13 @@ just in case somebody has a strange $TMP > 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 < from __future__ import absolute_import, print_function + > import os > import sys - > import os > print('%05o' % os.lstat(sys.argv[1]).st_mode) > EOF