hooking old doctests into unittests, thanks Niphlod
This commit is contained in:
1 parent
44eb880108
commit
7341988b01
2 files changed
+34
-1
No files matched your search
@@ -1 +1 @@
|
|||||||
Version 2.4.6-stable+timestamp.2013.04.15.15.58.57
|
Version 2.4.6-stable+timestamp.2013.04.15.17.18.31
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
""" Unit tests for old doctests in validators.py, utf8.py, html.py.
|
||||||
|
Don't abuse doctests, web2py > 2.4.5 will accept only unittests
|
||||||
|
"""
|
||||||
|
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
|
||||||
|
import doctest
|
||||||
|
|
||||||
|
def load_tests(loader, tests, ignore):
|
||||||
|
|
||||||
|
tests.addTests(
|
||||||
|
doctest.DocTestSuite('validators',
|
||||||
|
optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
tests.addTests(
|
||||||
|
doctest.DocTestSuite('html')
|
||||||
|
)
|
||||||
|
tests.addTests(
|
||||||
|
doctest.DocTestSuite('utf8')
|
||||||
|
)
|
||||||
|
return tests
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
Reference in new issue
Block a user