longnametest.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:rdiff-backup 作者: sol1 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号