How to use the johnnydep.pipper.compute_checksum function in johnnydep

To help you get started, we’ve selected a few johnnydep examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wimglenn / johnnydep / tests / test_pipper.py View on Github external
def test_compute_checksum(tmp_path):
    tmpfile = tmp_path.joinpath("fname")
    fname = str(tmpfile)
    tmpfile.write_text("spam and eggs")
    md5 = johnnydep.pipper.compute_checksum(fname, algorithm="md5")
    sha256 = johnnydep.pipper.compute_checksum(fname)
    assert md5 == "b581660cff17e78c84c3a84ad02e6785"
    assert sha256 == "7c788633adc75d113974372eec8c24776a581f095a747136e7ccf41b4a18b74e"
github wimglenn / johnnydep / tests / test_pipper.py View on Github external
def test_compute_checksum(tmp_path):
    tmpfile = tmp_path.joinpath("fname")
    fname = str(tmpfile)
    tmpfile.write_text("spam and eggs")
    md5 = johnnydep.pipper.compute_checksum(fname, algorithm="md5")
    sha256 = johnnydep.pipper.compute_checksum(fname)
    assert md5 == "b581660cff17e78c84c3a84ad02e6785"
    assert sha256 == "7c788633adc75d113974372eec8c24776a581f095a747136e7ccf41b4a18b74e"