More tests using doctests

This commit is contained in:
Maxime Beauchemin
2016-02-10 09:34:09 -08:00
parent 7b0c045a42
commit e039547762
2 changed files with 26 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
import imp
import doctest
import os
import unittest
os.environ['PANORAMIX_CONFIG'] = 'tests.panoramix_test_config'
@@ -43,6 +44,13 @@ class LiveTest(TestCase):
for dash in db.session.query(models.Dashboard).all():
self.client.get(dash.url)
def test_doctests(self):
modules = [utils]
for mod in modules:
failed, tests = doctest.testmod(mod)
if failed:
raise Exception("Failed a doctest")
def tearDown(self):
pass