#19 Assert that tox uses the appropriate Python version
Merged 4 years ago by churchyard. Opened 4 years ago by churchyard.
tests/ churchyard/python tox_version_match  into  master

file modified
+19 -5
@@ -86,6 +86,23 @@ 

  

  # use it with tox

  [[ "$TOX" != "true" ]] && exit 0

+ if [[ $PYTHON == python* ]]; then

+     export TOXENV=py${VERSION/./}

+ else

+     export TOXENV=$PYTHON

+ fi

+ 

+ cat > tox.ini << EOF

+ [tox]

+ skipsdist = True

+ [testenv]

+ commands = python -c 'import sys; print(sys.version)'

+ EOF

+ 

+ # Tests that the Python version used in tox is really the Python version we want

+ tox | tee toxlog

+ grep "^$VERSION\.[0-9]" toxlog

+ 

  cat > tox.ini << EOF

  [tox]

  skipsdist = True
@@ -94,8 +111,5 @@ 

  commands = python -m pytest -v test_foo.py

  EOF

  

- if [[ $PYTHON == python* ]]; then

-     tox -e py${VERSION/./}

- else

-     tox -e $PYTHON

- fi

+ # A more complex example with pytest

+ tox

file modified
+4
@@ -28,6 +28,9 @@ 

      - smoke38:

          dir: smoke

          run: VERSION=3.8 METHOD=venv ./venv.sh

+     - smoke39:

+         dir: smoke

+         run: VERSION=3.9 METHOD=venv ./venv.sh

      - smokepypy:

          dir: smoke

          run: VERSION=2.7 METHOD=virtualenv PYTHON=pypy ./venv.sh
@@ -51,6 +54,7 @@ 

      - python36

      - python37

      - python38

+     - python39

      - pypy

      - pypy3

      - python2-devel

no initial comment

1 new commit added

  • Test with Python 3.9 as well
4 years ago

Could you add a comment to explain what this is testing?

rebased onto 74239ca

4 years ago

Could you add a comment to explain what this is testing?

Amended.

Pull-Request has been merged by churchyard

4 years ago