def nonexisting_file_checksum(): assert checksum('nosuchfile', 10) is None
def existing_file_checksum(): path = os.path.join(os.getcwd(), 'requirements.dev.txt') must_be = '0cef80c690b7529d44b332fc' h = checksum(path, 24) assert h == must_be assert len(h) <= 24