def test_length_limit(self):
"""Confirm that length limit is max_len
Some of these tests depend on the length being at most
max_len, so check to make sure it's accurate.
"""
Myrm(self.out_rp.path)
self.out_rp.mkdir()
really_long = self.out_rp.append('a'*max_len)
really_long.touch()
try: too_long = self.out_rp.append("a"*(max_len+1))
except EnvironmentError, e:
assert errno.errorcode[e[0]] == 'ENAMETOOLONG', e
else: assert 0, "File made successfully with length " + str(max_len+1)
评论列表
文章目录