File: test_hashfile.py

package info (click to toggle)
python-auditwheel 5.3.0%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 816 kB
  • sloc: python: 4,270; ansic: 205; cpp: 58; makefile: 20; f90: 12
file content (14 lines) | stat: -rw-r--r-- 289 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from io import BytesIO

from auditwheel.hashfile import hashfile


def test_hash():
    # GIVEN
    mock_file = BytesIO(b"this is a test file")

    # WHEN
    result = hashfile(mock_file)

    # THEN
    assert result == "5881707e54b0112f901bc83a1ffbacac8fab74ea46a6f706a3efc5f7d4c1c625"