예제 #1
0
 def size(self, req):
     _path = self.abspath(req)
     if _path.exists():
         return format_size(_path.size)
예제 #2
0
def test_format_size():
    from clld.util import format_size

    for i in range(10):
        assert format_size(1000 ** i)
예제 #3
0
파일: download.py 프로젝트: FieldDB/clld
 def size(self, req):
     _path = self.abspath(req)
     if _path.exists():
         return format_size(_path.size)