def tearDown(self): p = URI("test.txt") if p.exists(): p.remove() l = URI("test_link") if l.islink(): l.remove()
def setUp(self): self.starttime = datetime.datetime.now() p = URI("test.txt") with p.open("w") as fs: fs.write('test') a_link = URI("test_link") if p.connection.supports_symlinks() and not a_link.islink(): p.symlink(a_link)