File: test_fallocate.py

package info (click to toggle)
python3-dmm 0.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 540 kB
  • sloc: python: 441; makefile: 2
file content (10 lines) | stat: -rwxr-xr-x 291 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/python3
from dmm.modules.fallocate import fallocate
import os

def test_fallocate_create_file():
    fallocate.create_file("4M", "/tmp/test.img")
    file_stats = os.stat("/tmp/test.img")
    # 4M is 4194304
    assert file_stats.st_size == 4194304
    os.remove("/tmp/test.img")