From 1e81810ab9d2097432b4ce6068100ace1f55c475 Mon Sep 17 00:00:00 2001 From: Ilya Shakhat Date: Fri, 22 Jan 2016 15:25:03 +0300 Subject: [PATCH] Add py34 job and fix errors Change-Id: Icf9724c34b54a2d6c7194227f262d24721558199 --- doc/source/test_plans/mq/plan.rst | 4 ++-- requirements.txt | 1 + tests/test_titles.py | 8 ++++---- tox.ini | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/source/test_plans/mq/plan.rst b/doc/source/test_plans/mq/plan.rst index 24eeeb5..6633e1f 100644 --- a/doc/source/test_plans/mq/plan.rst +++ b/doc/source/test_plans/mq/plan.rst @@ -184,7 +184,7 @@ following requirements need to be satisfied: This section describes installation steps for ZeroMQ. ZeroMQ (also ZMQ or 0MQ) is an embeddable networking library but acts like a concurrency framework. -Unlike other AMQP-based drivers, such as RabbitMQ, ZeroMQ doesn’t have any +Unlike other AMQP-based drivers, such as RabbitMQ, ZeroMQ doesn't have any central brokers in oslo.messaging. Instead, each host (running OpenStack services) is both a ZeroMQ client and a server. As a result, each host needs to listen to a certain TCP port for incoming connections and directly connect to @@ -230,7 +230,7 @@ following requirements need to be satisfied: configuration files. * To enable the driver, in the section [DEFAULT] of each configuration file, - the ‘rpc_backend’ flag must be set to ‘zmq’ and the ‘rpc_zmq_host’ flag + the 'rpc_backend' flag must be set to 'zmq' and the 'rpc_zmq_host' flag must be set to the hostname of the node. .. code-block:: none diff --git a/requirements.txt b/requirements.txt index 2d4bd5e..a4da12f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ rst2pdf +six>=1.9.0 sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 sphinxcontrib-httpdomain sphinx_rtd_theme diff --git a/tests/test_titles.py b/tests/test_titles.py index 38056d2..5692cc6 100644 --- a/tests/test_titles.py +++ b/tests/test_titles.py @@ -14,6 +14,7 @@ import glob import re import docutils.core +import six import testtools @@ -98,13 +99,12 @@ class TestTitles(testtools.TestCase): if x not in expect[section]] for ex_s in extra_subsections: - s_name = (ex_s if type(ex_s) is str or - type(ex_s) is unicode else ex_s["name"]) + s_name = (ex_s if isinstance(ex_s, six.string_types) + else ex_s["name"]) if s_name.startswith("Test Case"): new_missing_subsections = [] for m_s in missing_subsections: - m_s_name = (m_s if type(m_s) is str or - type(m_s) is unicode + m_s_name = (m_s if isinstance(m_s, six.string_types) else m_s["name"]) if not m_s_name.startswith("Test Case"): new_missing_subsections.append(m_s) diff --git a/tox.ini b/tox.ini index f4579f7..22ff7a2 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = docs,py27,pep8 +envlist = docs,py34,py27,pep8 minversion = 1.6 skipsdist = True