mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-12 07:52:38 +00:00
Repair fileutil tests.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
12773ea034
commit
ba9abe6a2b
@ -732,15 +732,15 @@ class FileUtil(ReallyEqualMixin, unittest.TestCase):
|
|||||||
|
|
||||||
# path at which nothing exists
|
# path at which nothing exists
|
||||||
dnename = os.path.join(basedir, "doesnotexist")
|
dnename = os.path.join(basedir, "doesnotexist")
|
||||||
now = time.time()
|
now_ns = fileutil.seconds_to_ns(time.time())
|
||||||
dneinfo = fileutil.get_pathinfo(dnename, now=now)
|
dneinfo = fileutil.get_pathinfo(dnename, now_ns=now_ns)
|
||||||
self.failUnlessFalse(dneinfo.exists)
|
self.failUnlessFalse(dneinfo.exists)
|
||||||
self.failUnlessFalse(dneinfo.isfile)
|
self.failUnlessFalse(dneinfo.isfile)
|
||||||
self.failUnlessFalse(dneinfo.isdir)
|
self.failUnlessFalse(dneinfo.isdir)
|
||||||
self.failUnlessFalse(dneinfo.islink)
|
self.failUnlessFalse(dneinfo.islink)
|
||||||
self.failUnlessEqual(dneinfo.size, None)
|
self.failUnlessEqual(dneinfo.size, None)
|
||||||
self.failUnlessEqual(dneinfo.mtime, now)
|
self.failUnlessEqual(dneinfo.mtime_ns, now_ns)
|
||||||
self.failUnlessEqual(dneinfo.ctime, now)
|
self.failUnlessEqual(dneinfo.ctime_ns, now_ns)
|
||||||
|
|
||||||
def test_get_pathinfo_symlink(self):
|
def test_get_pathinfo_symlink(self):
|
||||||
if not hasattr(os, 'symlink'):
|
if not hasattr(os, 'symlink'):
|
||||||
|
Loading…
Reference in New Issue
Block a user