File: test_dd.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 293 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/python3
from dmm.modules.dd import dd
import os

def test_dd_create_file():
    dd.create_file("/dev/zero", "/tmp/test.img", "2M", "2", 2)
    file_stats = os.stat("/tmp/test.img")
    # 2M * 2 should equal 4M
    assert file_stats.st_size == 4194304
    os.remove("/tmp/test.img")