py3: use node.hex(h.digest()) instead of h.hexdigest()
hashlib.sha1.hexdigest() returns str on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D5261
To run the tests, do:cd tests/python run-tests.pySee https://mercurial-scm.org/wiki/WritingTests formore information on writing tests.