From 6594e7a607960d4ddca4d1e8a1c50217ffecdb30 Mon Sep 17 00:00:00 2001 From: niphlod Date: Wed, 17 Apr 2013 23:55:11 +0200 Subject: [PATCH] add doctest hook for markmin. It wasn't run previously. --- gluon/tests/__init__.py | 1 - gluon/tests/test_markmin.py | 22 ---------------------- gluon/tests/test_old_doctests.py | 9 ++++++++- 3 files changed, 8 insertions(+), 24 deletions(-) delete mode 100644 gluon/tests/test_markmin.py diff --git a/gluon/tests/__init__.py b/gluon/tests/__init__.py index 5f426689..1ce8fb20 100644 --- a/gluon/tests/__init__.py +++ b/gluon/tests/__init__.py @@ -9,7 +9,6 @@ from test_storage import * from test_template import * from test_utils import * from test_contribs import * -from test_markmin import * from test_web import * import sys diff --git a/gluon/tests/test_markmin.py b/gluon/tests/test_markmin.py deleted file mode 100644 index f53d3aa0..00000000 --- a/gluon/tests/test_markmin.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -""" - Unit tests for running web2py -""" -import sys -import os -if os.path.isdir('gluon'): - sys.path.append(os.path.realpath('gluon')) -else: - sys.path.append(os.path.realpath('../')) - -import unittest -from contrib.markmin.markmin2html import run_doctests - - -class TestMarkmin(unittest.TestCase): - def testMarkmin(self): - run_doctests() - -if __name__ == '__main__': - unittest.main() diff --git a/gluon/tests/test_old_doctests.py b/gluon/tests/test_old_doctests.py index 2a7fc54b..95427a3e 100644 --- a/gluon/tests/test_old_doctests.py +++ b/gluon/tests/test_old_doctests.py @@ -1,7 +1,8 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -""" Unit tests for old doctests in validators.py, utf8.py, html.py. +""" Unit tests for old doctests in validators.py, utf8.py, html.py, + markmin2html.py. Don't abuse doctests, web2py > 2.4.5 will accept only unittests """ import sys @@ -27,6 +28,12 @@ def load_tests(loader, tests, ignore): tests.addTests( doctest.DocTestSuite('utf8') ) + + tests.addTests( + doctest.DocTestSuite('contrib.markmin.markmin2html', + ) + ) + return tests if __name__ == '__main__':