From ac0ac446aaa0af517a2b726e48d3b37eeffd46e5 Mon Sep 17 00:00:00 2001 From: Duncan McGreggor Date: Wed, 7 Dec 2011 15:20:55 -0800 Subject: Updated the test runner module with a sys.path insert so that tests run in and outside a virtual environment. This addresses bug 901387 Change-Id: I12a2b1eeaf0ce46796af6e42fd6537bccd6a4d8f --- nova/testing/runner.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'nova') diff --git a/nova/testing/runner.py b/nova/testing/runner.py index 9fbbb418d..794fa3845 100644 --- a/nova/testing/runner.py +++ b/nova/testing/runner.py @@ -63,13 +63,16 @@ import unittest import sys import time -gettext.install('nova', unicode=1) - import eventlet from nose import config from nose import core from nose import result +gettext.install('nova', unicode=1) +reldir = os.path.join(os.path.dirname(__file__), '..', '..') +absdir = os.path.abspath(reldir) +sys.path.insert(0, absdir) + from nova import log as logging -- cgit