def test_ftruncate(self): if hasattr(os, "ftruncate"): self.check(os.truncate, 0) self.check(os.ftruncate, 0)