diff --git a/.travis.yml b/.travis.yml index b5cf62067..732ec7584 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,31 +1,38 @@ language: python matrix: include: + - os: osx + language: generic + env: PYTHON_INSTALLER=pyenv TRAVIS_PYTHON_VERSION=2.7.14 + - os: osx + language: generic + env: PYTHON_INSTALLER=pyenv TRAVIS_PYTHON_VERSION=3.6.4 + - os: osx + language: generic + env: + - PYTHON_INSTALLER=brew + - PIP_USER_FLAG="--user" - os: linux python: 2.7 - os: linux - python: 3.4 + python: 3.4 # When support for 3.4 is removed unpin the PyYAML version below. - os: linux python: 3.5 - os: linux python: 3.6 - - os: osx - language: generic - env: PYTHON_INSTALLER=brew - - os: osx - language: generic - env: PYTHON_INSTALLER=pyenv TRAVIS_PYTHON_VERSION=2.7.14 - - os: osx - language: generic - env: PYTHON_INSTALLER=pyenv TRAVIS_PYTHON_VERSION=3.6.4 + - os: linux + python: 3.7 + - os: linux + python: 3.8 # command to install dependencies install: - source .travis/install.sh - python --version - - python -m pip install PyYAML argparse rospkg vcstools catkin_pkg python-dateutil rosdistro - - python -m pip install -e . - - python -m pip install nose coverage flake8 mock codecov + - if [ $TRAVIS_PYTHON_VERSION == "3.4" ]; then python -m pip install PyYAML==5.2; fi # Forcing PyYAML 5.2 while we retain Python 3.4 support PyYAML 5.3 and higher does not support Python 3.4 + - python -m pip install $PIP_USER_FLAG PyYAML argparse rospkg vcstools catkin_pkg python-dateutil rosdistro + - python -m pip install $PIP_USER_FLAG -e . + - python -m pip install $PIP_USER_FLAG nose coverage flake8 mock codecov # command to run tests script: - python -m nose --with-coverage --cover-package=rosdep2 --with-xunit test diff --git a/test/test_rosdep_lookup.py b/test/test_rosdep_lookup.py index 30f26877a..e4648e51c 100644 --- a/test/test_rosdep_lookup.py +++ b/test/test_rosdep_lookup.py @@ -58,14 +58,14 @@ def create_test_SourcesListLoader(): def get_cache_raw(): cache_rosdep_path = os.path.join(get_cache_dir(), '0a12d6e7b0d47be9b76e7726720e4cb79528cbaa') with open(cache_rosdep_path) as f: - cache_raw = yaml.load(f.read()) + cache_raw = yaml.safe_load(f.read()) return cache_raw def get_cache_raw_python(): cache_rosdep_path = os.path.join(get_cache_dir(), 'f6f4ef95664e373cd4754501337fa217f5b55d91') with open(cache_rosdep_path) as f: - cache_raw = yaml.load(f.read()) + cache_raw = yaml.safe_load(f.read()) return cache_raw @@ -125,7 +125,7 @@ def test_RosdepDefinition(): pass # - test w/valid data - d2 = yaml.load(FAKE_TINYXML_RULE)['testtinyxml'] + d2 = yaml.safe_load(FAKE_TINYXML_RULE)['testtinyxml'] definition = RosdepDefinition('d2', d2, 'file2.txt') # - tripwire str(definition)