tests/test-version-install.t
author Ian Moody <moz-ian@perix.co.uk>
Thu, 03 Oct 2019 23:17:13 +0100
branchstable
changeset 4875 164543ac3277
child 4876 1a47cc2728ff
permissions -rw-r--r--
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.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4875
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
     1
  $ cat >> $HGRCPATH <<EOF
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
     2
  > [extensions]
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
     3
  > EOF
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
     4
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
     5
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
     6
Test outputting version number
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
     7
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
     8
  $ hg version -v
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
     9
  Mercurial Distributed SCM (version *) (glob)
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
    10
  (see https://mercurial-scm.org for more information)
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
    11
  
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
    12
  Copyright (C) 2005-* Matt Mackall and others (glob)
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
    13
  This is free software; see the source for copying conditions. There is NO
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
    14
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
    15
  
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
    16
  Enabled extensions:
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
    17
  
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
    18
    evolve  external  * (glob)
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
    19
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
    20
Test install
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
    21
BROKEN: can't call setup.py from a different dir
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
    22
  $ "$PYTHON" "$TESTDIR/../setup.py" install --root "$TESTTMP/installtest" > /dev/null
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
    23
  Traceback (most recent call last):
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
    24
    File "*/../setup.py", line *, in <module> (glob)
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
    25
      long_description=open('README').read(),
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
    26
  IOError: [Errno 2] No such file or directory: 'README' (no-py3 !)
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
    27
  FileNotFoundError: [Errno 2] No such file or directory: 'README' (py3 !)
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
    28
  [1]