From 89305784155104c6d411294cd9cfa3ee354cc57c Mon Sep 17 00:00:00 2001 From: Jon Wayne Parrott Date: Thu, 18 Feb 2016 10:57:22 -0800 Subject: [PATCH] Passing all environment variables in tox.ini --- managed_vms/memcache/main_test.py | 6 ++++++ tox.ini | 16 ++-------------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/managed_vms/memcache/main_test.py b/managed_vms/memcache/main_test.py index 5cc4fb852c5..d4572f952e1 100644 --- a/managed_vms/memcache/main_test.py +++ b/managed_vms/memcache/main_test.py @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from unittest.case import SkipTest + from testing import CloudTest from . import main @@ -21,6 +23,10 @@ class MemcacheTest(CloudTest): def test_index(self): main.memcache_client.set('counter', 0) + + if main.memcache_client.get('counter') is None: + raise SkipTest('Memcache is unavailable.') + main.app.testing = True client = main.app.test_client() diff --git a/tox.ini b/tox.ini index bc7a3e9b045..e66ddc905d9 100644 --- a/tox.ini +++ b/tox.ini @@ -3,19 +3,7 @@ skipsdist = True envlist = pep8, reqcheck, gae, py27, py34 [testenv] -passenv = - PYTHONPATH - GOOGLE_* - GCLOUD_* - TEST_* - CLOUD_* - TRAVIS* - SQLALCHEMY_DATABASE_URI - PUBSUB_* - GA_TRACKING_ID - MAILGUN_* - SENDGRID_* - TWILIO_* +passenv = * basepython = python2.7 deps = -rrequirements.txt @@ -56,7 +44,7 @@ deps = -rrequirements-py27-dev.txt commands = # Create a lib directory, otherwise, the vendor library will explode. - mkdir lib + mkdir -p lib nosetests --with-gae \ --gae-app=appengine/resources/app.yaml \ --logging-level=INFO \