From 7cee58bce943c569c791d1be33847c1341a70cba Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Tue, 23 Sep 2014 13:23:29 -0400 Subject: [PATCH] Fix broken sphinx tests. Change-Id: I2c2046b4ef31c78731f25f3b8e579b05ca0953fb --- tests/test_sphinxext.py | 16 +++++++++++----- tox.ini | 1 + 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/tests/test_sphinxext.py b/tests/test_sphinxext.py index 43b7db9..78f80dd 100644 --- a/tests/test_sphinxext.py +++ b/tests/test_sphinxext.py @@ -20,11 +20,17 @@ class TestSphinxExt(unittest.TestCase): def test_buildhtml(self): if not os.path.exists('.test_sphinxext/'): os.makedirs('.test_sphinxext/') - assert sphinx.main(['', - '-b', 'html', - '-d', '.test_sphinxext/doctree', - docpath, - '.test_sphinxext/html']) == 0 + try: + sphinx.main([ + '', + '-b', 'html', + '-d', '.test_sphinxext/doctree', + docpath, + '.test_sphinxext/html' + ]) + assert Exception("Should raise SystemExit 0") + except SystemExit as e: + assert e.code == 0 class TestDataTypeName(unittest.TestCase): diff --git a/tox.ini b/tox.ini index ab885fc..849e1c4 100644 --- a/tox.ini +++ b/tox.ini @@ -10,6 +10,7 @@ testtools = basedeps = transaction pecan + cloud_sptheme Sphinx Flask