Skip to content

Commit

Permalink
Enable py38 testing (#1360)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktbyers committed Sep 10, 2019
1 parent d12569f commit ebf92ae
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 12 deletions.
24 changes: 18 additions & 6 deletions .travis.yml
Expand Up @@ -3,13 +3,25 @@ language: python
python:
- "3.6"
- "3.7"
- "3.8-dev"
- "nightly"
stages:
- lint
- test
matrix:
include:
- python: 3.6
env: TOXENV=black
- python: 3.6
env: TOXENV=pylama
install:
- stage: lint
name: Black
python: 3.6
env: TOXENV=black
- stage: lint
name: Pylama
python: 3.6
env: TOXENV=pylama
allow_failures:
- python: 3.8-dev
- python: nightly
install:
- pip install tox==3.13.2 tox-travis==0.12
script:
script:
- tox
5 changes: 3 additions & 2 deletions requirements-genie.txt
@@ -1,2 +1,3 @@
pyats>=19.7; python_version>="3.4"
genie>=19.7; python_version>="3.4"
# pyats and genie are not available for Python 3.8 yet
pyats>=19.7; python_version<"3.8"
genie>=19.7; python_version<"3.8"
3 changes: 3 additions & 0 deletions setup.cfg
Expand Up @@ -11,3 +11,6 @@ skip = tests/*,build/*,.tox/*,netmiko/_textfsm/*,examples/use_cases/*

[pylama:pep8]
max_line_length = 100

[tool:pytest]
addopts = -rs
10 changes: 7 additions & 3 deletions tests/unit/test_utilities.py
Expand Up @@ -4,6 +4,8 @@
from os.path import dirname, join, relpath
import sys

import pytest

from netmiko import utilities
from netmiko._textfsm import _clitable as clitable

Expand Down Expand Up @@ -207,11 +209,13 @@ def test_get_structured_data_relative_path():
assert result == [{"model": "4500"}]


@pytest.mark.skipif(
sys.version_info >= (3, 8),
reason="The genie package is not available for Python 3.8 yet",
)
def test_get_structured_data_genie():
"""Convert raw CLI output to structured data using Genie"""
if not sys.version_info >= (3, 4):
assert True
return

raw_output = """Cisco IOS Software, C3560CX Software (C3560CX-UNIVERSALK9-M), Version 15.2(4)E7, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2018 by Cisco Systems, Inc.
Expand Down
12 changes: 11 additions & 1 deletion tox.ini
@@ -1,5 +1,15 @@
[tox]
envlist = py36,py37
envlist = py3{6,7,8},black,pylama
skip_missing_interpreters = true

[travis]
python =
3.6: py36,black,pylama

[travis:env]
TRAVIS_BUILD_STAGE_NAME =
Lint: black,pylama
Test: py3{6,7,8}

[testenv]
deps =
Expand Down

0 comments on commit ebf92ae

Please sign in to comment.