# -*- 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"])

[((430, 456), 'os.path.basename', 'os.path.basename', (['__file__'], {}), '(__file__)\n', (446, 456), False, 'import os\n'), ((461, 505), 'pytest.main', 'pytest.main', (["[basename, '-s', '--tb=native']"], {}), "([basename, '-s', '--tb=native'])\n", (472, 505), False, 'import pytest\n'), ((145, 159), 'pathlib_mate.pathlib2.Path', 'Path', (['__file__'], {}), '(__file__)\n', (149, 159), False, 'from pathlib_mate.pathlib2 import Path\n')]