summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Ceratto <federico.ceratto@gmail.com>2017-01-29 14:38:51 +0000
committerGitHub <noreply@github.com>2017-01-29 14:38:51 +0000
commitd5fac912dfd9741258f9483ead67e4464418ff8a (patch)
tree6ba5bbc336f553e15ceab23addf2a0720eacce04
parentdd7e5f6295a42d698d882a623dd6c7339b5163b4 (diff)
parent2a778d0592686f4636445cf4ea2bd51f75d39fad (diff)
downloadcmd2-git-d5fac912dfd9741258f9483ead67e4464418ff8a.tar.gz
Merge pull request #32 from tleonhardt/travis_osx
Added testing on Mac OS X with Python 2.7 and for Python 3.6 on Linux and fixed Windows AppVeyor tests.
-rw-r--r--.travis.yml32
-rwxr-xr-xREADME.rst4
-rw-r--r--tests/test_cmd2.py9
3 files changed, 29 insertions, 16 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/README.rst b/README.rst
index 574504da..b552aae4 100755
--- a/README.rst
+++ b/README.rst
@@ -3,11 +3,11 @@ cmd2
----
.. image:: https://secure.travis-ci.org/python-cmd2/cmd2.png?branch=master
- :target: http://travis-ci.org/python-cmd2/cmd2
+ :target: https://travis-ci.org/python-cmd2/cmd2
:alt: Build status
.. image:: https://ci.appveyor.com/api/projects/status/github/python-cmd2/cmd2
- :target: http://travis-ci.org/python-cmd2/cmd2
+ :target: https://ci.appveyor.com/project/FedericoCeratto/cmd2
:alt: Appveyor build status
.. image:: https://img.shields.io/pypi/dm/cmd2.svg?style=plastic
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