First pass at adding compute unit tests.

Change-Id: Icf3340d457f75eec89bb0e5c9b4b953c3b81020f
This commit is contained in:
Josh Kearney
2013-01-24 12:33:17 -06:00
committed by Dean Troyer
parent 1bb59c53ee
commit 4297e5781b
5 changed files with 92 additions and 22 deletions

@ -22,14 +22,13 @@ import testtools
class TestCase(testtools.TestCase):
def setUp(self):
super(TestCase, self).setUp()
if (os.environ.get("OS_STDOUT_NOCAPTURE") == "True" and
os.environ.get("OS_STDOUT_NOCAPTURE") == "1"):
stdout = self.useFixture(fixtures.StringStream("stdout")).stream
self.useFixture(fixtures.MonkeyPatch("sys.stdout", stdout))
if (os.environ.get("OS_STDERR_NOCAPTURE") == "True" and
os.environ.get("OS_STDERR_NOCAPTURE") == "1"):
stderr = self.useFixture(fixtures.StringStream("stderr")).stream
self.useFixture(fixtures.MonkeyPatch("sys.stderr", stderr))
def tearDown(self):
super(TestCase, self).tearDown()