-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added suport for Manuel and updated some tests.
Updated to use Manuel to run its doctests and manuelpi.fakemodule to process doctest-defined modules. README.txt now supports this new doctest style.
- Loading branch information
1 parent
c3b57a2
commit b84933a
Showing
3 changed files
with
138 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,19 @@ | ||
import unittest | ||
import manuel.testing | ||
import manuel.isolation | ||
import manuel.doctest | ||
import manuelpi.fakemodule | ||
from zope.testing import doctest | ||
from martian.testing import FakeModule | ||
|
||
optionflags = doctest.NORMALIZE_WHITESPACE + doctest.ELLIPSIS | ||
|
||
globs = dict(FakeModule=FakeModule) | ||
|
||
def test_suite(): | ||
suite = unittest.TestSuite() | ||
suite.addTests([ | ||
doctest.DocFileSuite('README.txt', | ||
package='martian', | ||
globs=globs, | ||
optionflags=optionflags), | ||
doctest.DocFileSuite('scan.txt', | ||
package='martian', | ||
optionflags=optionflags), | ||
doctest.DocFileSuite('directive.txt', | ||
package='martian', | ||
globs=globs, | ||
optionflags=optionflags), | ||
doctest.DocFileSuite('core.txt', | ||
package='martian', | ||
globs=globs, | ||
optionflags=optionflags), | ||
doctest.DocFileSuite('edgecase.txt', | ||
package='martian', | ||
globs=globs, | ||
optionflags=optionflags), | ||
doctest.DocFileSuite('scan_for_classes.txt', | ||
package='martian.tests', | ||
optionflags=optionflags), | ||
doctest.DocFileSuite('public_methods_from_class.txt', | ||
package='martian.tests', | ||
optionflags=optionflags), | ||
doctest.DocFileSuite('context.txt', | ||
package='martian', | ||
globs=globs, | ||
optionflags=optionflags), | ||
]) | ||
return suite | ||
tests = ['../README.txt', '../scan.txt', '../directive.txt', | ||
'../core.txt', '../edgecase.txt', 'scan_for_classes.txt', | ||
'public_methods_from_class.txt', '../context.txt'] | ||
|
||
m = manuel.doctest.Manuel(optionflags=optionflags) | ||
m += manuel.isolation.Manuel() | ||
m += manuelpi.fakemodule.Manuel() | ||
|
||
return manuel.testing.TestSuite(m, *tests) |