#24 Make it possible to run Python 3.4 tests optionally
Merged 2 years ago by churchyard. Opened 2 years ago by churchyard.
tests/ churchyard/python py34_optional  into  master

file modified
+9
@@ -8,10 +8,19 @@ 

  PYTHON=${PYTHON:-python$VERSION}

  METHOD=${METHOD:-venv}

  TOX=${TOX:-true}

+ INSTALL_OR_SKIP=${INSTALL_OR_SKIP:-false}

  

  # clean from possible older runs

  rm -rf venv .tox __pycache__ .pytest* test_*.py *.pyx *.c *.so ensurepiptestroot || :

  

+ if [ "$INSTALL_OR_SKIP" == "true" ] && [ ! -f "/usr/bin/$PYTHON" ]; then

+   dnf -y install "/usr/bin/$PYTHON" || :

+   if [ ! -f "/usr/bin/$PYTHON" ]; then

+     echo "/usr/bin/$PYTHON not installable, skipping this test"

+     exit 0

+   fi

+ fi

+ 

  # check the we can create the venv

  if [ "$METHOD" == "venv" ]; then

    $PYTHON -m venv venv

file modified
+10 -6
@@ -34,6 +34,9 @@ 

      - smoke39:

          dir: smoke

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

+     - smoke34_optional:

+         dir: smoke

+         run: VERSION=3.4 METHOD=venv INSTALL_OR_SKIP=true ./venv.sh

      - smokepypy:

          dir: smoke

          run: VERSION=2.7 METHOD=virtualenv PYTHON=pypy ./venv.sh
@@ -50,14 +53,15 @@ 

          dir: flags

          run: python3-debug ./assertflags.py -Og

      required_packages:

+     - dnf

      - gcc

      - virtualenv

-     - python27

-     - python35

-     - python36

-     - python37

-     - python38

-     - python39

+     - python2.7

+     - python3.5

+     - python3.6

+     - python3.7

+     - python3.8

+     - python3.9

      - pypy

      - pypy3

      - python2-devel

no initial comment

2 new commits added

  • Make it possible to run Python 3.4 tests optionally
  • Require Python packages with dots
2 years ago

It's a bit hacky, but should work. +1

Pull-Request has been merged by churchyard

2 years ago