summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml32
-rw-r--r--tests/test_cmd2.py9
2 files changed, 27 insertions, 14 deletions
diff --git a/.travis.yml b/.travis.yml
index 890d5c05..109fe491 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,19 +1,29 @@
language: python
-sudo: false # enable container-based build
-install:
- - pip install tox
-script:
- - tox
-# workaround for https://github.com/travis-ci/travis-ci/issues/4794
+sudo: false # enable container-based build for fast boot times on Linux
matrix:
include:
- - python: 2.7
+ - os: linux
+ python: 2.7
env: TOXENV=py27
- - python: 3.3
+ - os: linux
+ python: 3.3
env: TOXENV=py33
- - python: 3.4
+ - os: linux
+ python: 3.4
env: TOXENV=py34
- - python: 3.5
+ - os: linux
+ python: 3.5
env: TOXENV=py35
- - python: pypy
+ - os: linux
+ python: 3.6
+ env: TOXENV=py36
+ - os: linux
+ python: pypy
env: TOXENV=pypy
+ - os: osx
+ language: generic
+ env: TOXENV=py27
+install:
+ - pip install tox
+script:
+ - tox
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py
index bd7f2737..194892f7 100644
--- a/tests/test_cmd2.py
+++ b/tests/test_cmd2.py
@@ -6,7 +6,6 @@
# Released under MIT license, see LICENSE file
import mock
-import pytest
from conftest import run_cmd, _normalize
from six import StringIO
@@ -72,11 +71,15 @@ def notest_base_(base_app):
def test_base_show(base_app):
+ import sys
out = run_cmd(base_app, 'show')
+ expect_colors = True
+ if sys.platform.startswith('win'):
+ expect_colors = False
expected = _normalize("""
abbrev: True
case_insensitive: True
-colors: True
+colors: {}
continuation_prompt: >
debug: False
default_file_name: command.txt
@@ -85,7 +88,7 @@ feedback_to_output: False
prompt: (Cmd)
quiet: False
timing: False
-""")
+""".format(expect_colors))
# ignore "editor: vi" (could be others)
out = [l for l in out if not l.startswith('editor: ')]
assert out == expected