# -*- coding: utf-8 -*-

import pytest
from pathlib_mate.pathlib2 import Path


class TestHashesMethods(object):
    def test(self):
        p = Path(__file__)
        assert len({
            p.md5, p.get_partial_md5(nbytes=1 << 20),
            p.sha256, p.get_partial_sha256(nbytes=1 << 20),
            p.sha512, p.get_partial_sha512(nbytes=1 << 20),
        }) == 3


if __name__ == "__main__":
    import os

    basename = os.path.basename(__file__)
    pytest.main([basename, "-s", "--tb=native"])

[((20, 15, 20, 41), 'os.path.basename', 'os.path.basename', ({(20, 32, 20, 40): '__file__'}, {}), '(__file__)', False, 'import os\n'), ((21, 4, 21, 48), 'pytest.main', 'pytest.main', ({(21, 16, 21, 47): "[basename, '-s', '--tb=native']"}, {}), "([basename, '-s', '--tb=native'])", False, 'import pytest\n'), ((9, 12, 9, 26), 'pathlib_mate.pathlib2.Path', 'Path', ({(9, 17, 9, 25): '__file__'}, {}), '(__file__)', False, 'from pathlib_mate.pathlib2 import Path\n')]