tests/test-version-install.t
author Ian Moody <moz-ian@perix.co.uk>
Thu, 03 Oct 2019 23:20:47 +0100
branchstable
changeset 4876 1a47cc2728ff
parent 4875 164543ac3277
child 4877 77e5c733200a
permissions -rw-r--r--
setup: make runnable from other dirs Currently it fails when run in that way for two reasons: - the description is loaded from the README file but with a path relative to the working directory - module references have the same issue, which is fixed with package_dir.
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
4876
1a47cc2728ff setup: make runnable from other dirs
Ian Moody <moz-ian@perix.co.uk>
parents: 4875
diff changeset
    21
#if py3
1a47cc2728ff setup: make runnable from other dirs
Ian Moody <moz-ian@perix.co.uk>
parents: 4875
diff changeset
    22
BROKEN: unicode errors opening the README
4875
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
    23
  $ "$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
    24
  Traceback (most recent call last):
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
    25
    File "*/../setup.py", line *, in <module> (glob)
4876
1a47cc2728ff setup: make runnable from other dirs
Ian Moody <moz-ian@perix.co.uk>
parents: 4875
diff changeset
    26
      long_description=open(join(dirname(__file__), 'README')).read(),
1a47cc2728ff setup: make runnable from other dirs
Ian Moody <moz-ian@perix.co.uk>
parents: 4875
diff changeset
    27
    File "*/encodings/ascii.py", line *, in decode (glob)
1a47cc2728ff setup: make runnable from other dirs
Ian Moody <moz-ian@perix.co.uk>
parents: 4875
diff changeset
    28
      return codecs.ascii_decode(input, self.errors)[0]
1a47cc2728ff setup: make runnable from other dirs
Ian Moody <moz-ian@perix.co.uk>
parents: 4875
diff changeset
    29
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 460: ordinal not in range(128)
4875
164543ac3277 setup: add a test for running setup.py
Ian Moody <moz-ian@perix.co.uk>
parents:
diff changeset
    30
  [1]
4876
1a47cc2728ff setup: make runnable from other dirs
Ian Moody <moz-ian@perix.co.uk>
parents: 4875
diff changeset
    31
#else
1a47cc2728ff setup: make runnable from other dirs
Ian Moody <moz-ian@perix.co.uk>
parents: 4875
diff changeset
    32
TODO: fix warning
1a47cc2728ff setup: make runnable from other dirs
Ian Moody <moz-ian@perix.co.uk>
parents: 4875
diff changeset
    33
  $ "$PYTHON" "$TESTDIR/../setup.py" install --root "$TESTTMP/installtest" > /dev/null
1a47cc2728ff setup: make runnable from other dirs
Ian Moody <moz-ian@perix.co.uk>
parents: 4875
diff changeset
    34
  */distutils/dist.py:*: UserWarning: Unknown distribution option: 'python_requires' (glob)
1a47cc2728ff setup: make runnable from other dirs
Ian Moody <moz-ian@perix.co.uk>
parents: 4875
diff changeset
    35
    warnings.warn(msg)
1a47cc2728ff setup: make runnable from other dirs
Ian Moody <moz-ian@perix.co.uk>
parents: 4875
diff changeset
    36
#endif