# HG changeset patch # User Ian Moody # Date 1570141033 -3600 # Node ID 164543ac3277424b1beb2d7e9d59c6299ecce2d5 # Parent ab0d09c935322325caee6abdc83c5f13990aa320 setup: add a test for running setup.py `python3 -m pip install hg-evolve==9.2.0` currently fails, despite 9.2.0 being the first beta py3 release, because of unicode issues with the version number. `setup.py install` is a proxy test for pip install since it also suffers from similar, however the test currently fails due to running setup.py from a different directory to the one it is in. Also add a test for `hg version -v` with evolve enabled since a naive first solution for the pip issue was to just change `__version__` to a `u''` string, but that busts version display in `version -v`, which isn't currently picked up by tests. diff -r ab0d09c93532 -r 164543ac3277 tests/test-version-install.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-version-install.t Thu Oct 03 23:17:13 2019 +0100 @@ -0,0 +1,28 @@ + $ cat >> $HGRCPATH < [extensions] + > EOF + $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH + +Test outputting version number + + $ hg version -v + Mercurial Distributed SCM (version *) (glob) + (see https://mercurial-scm.org for more information) + + Copyright (C) 2005-* Matt Mackall and others (glob) + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + Enabled extensions: + + evolve external * (glob) + +Test install +BROKEN: can't call setup.py from a different dir + $ "$PYTHON" "$TESTDIR/../setup.py" install --root "$TESTTMP/installtest" > /dev/null + Traceback (most recent call last): + File "*/../setup.py", line *, in (glob) + long_description=open('README').read(), + IOError: [Errno 2] No such file or directory: 'README' (no-py3 !) + FileNotFoundError: [Errno 2] No such file or directory: 'README' (py3 !) + [1]