示例#1
0
文件: test_util.py 项目: hashar/smmap
 def test_region_list(self):
     fc = FileCreator(100, "sample_file")
     
     fd = os.open(fc.path, os.O_RDONLY)
     for item in (fc.path, fd):
         ml = MapRegionList(item)
         
         assert ml.client_count() == 1
         
         assert len(ml) == 0
         assert ml.path_or_fd() == item
         assert ml.file_size() == fc.size
     #END handle input
     os.close(fd)