From be584deff86d2e371a5c76cd77d3f8c958c6c1df 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, 7 insertions(+), 15 deletions(-) diff --git a/managed_vms/memcache/main_test.py b/managed_vms/memcache/main_test.py index 5cc4fb852c51..bd3e9a756fb1 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 @@ -20,7 +22,9 @@ class MemcacheTest(CloudTest): def test_index(self): - main.memcache_client.set('counter', 0) + if main.memcache_client.set('counter', 0) 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 bc7a3e9b045c..e66ddc905d93 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 \