Commit 0f4a1a11 authored by Dylan Trotter's avatar Dylan Trotter

Alphabetize StatResult functions.

parent 94df6066
...@@ -80,16 +80,16 @@ class StatResult(object): ...@@ -80,16 +80,16 @@ class StatResult(object):
# TODO: Make this a decorator once they're implemented. # TODO: Make this a decorator once they're implemented.
st_mode = property(st_mode) st_mode = property(st_mode)
def st_size(self):
return self._info.Size()
# TODO: Make this a decorator once they're implemented.
st_size = property(st_size)
def st_mtime(self): def st_mtime(self):
return float(self._info.ModTime().UnixNano()) / Second return float(self._info.ModTime().UnixNano()) / Second
# TODO: Make this a decorator once they're implemented. # TODO: Make this a decorator once they're implemented.
st_mtime = property(st_mtime) st_mtime = property(st_mtime)
def st_size(self):
return self._info.Size()
# TODO: Make this a decorator once they're implemented.
st_size = property(st_size)
def stat(filepath): def stat(filepath):
info, err = Stat(filepath) info, err = Stat(filepath)
......
...@@ -169,9 +169,9 @@ def TestStatFile(): ...@@ -169,9 +169,9 @@ def TestStatFile():
os.remove(path) os.remove(path)
assert not stat.S_ISDIR(st.st_mode) assert not stat.S_ISDIR(st.st_mode)
assert stat.S_IMODE(st.st_mode) == 0o600 assert stat.S_IMODE(st.st_mode) == 0o600
assert st.st_size == 0
# System time and mtime may have different precision so give 10 sec leeway. # System time and mtime may have different precision so give 10 sec leeway.
assert st.st_mtime + 10 > t assert st.st_mtime + 10 > t
assert st.st_size == 0
def TestStatDir(): def TestStatDir():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment