Skip to content
This repository has been archived by the owner on May 13, 2020. It is now read-only.

Commit

Permalink
add a test for version
Browse files Browse the repository at this point in the history
  • Loading branch information
agroszer committed Mar 7, 2013
1 parent ab483a3 commit cb25b86
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions src/zope/wineggbuilder/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,38 @@

import unittest
from zope.testing import doctest
#import doctest
import pprint


def doctest_versions():
"""Check some assumptions on version comparison
>>> from distutils.version import StrictVersion
>>> v4 = StrictVersion('4.0.0')
>>> v4a = StrictVersion('4.0.0a1')
>>> v4 > v4a
True
>>> v4 == v4a
False
>>> v4 < v4a
False
"""


def test_suite():
return unittest.TestSuite((
doctest.DocFileSuite('test.txt',
optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
globs={'pprint': pprint}
),
optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
globs={'pprint': pprint}
),
doctest.DocTestSuite(
optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
)
))


if __name__ == '__main__':
unittest.main(defaultTest='test_suite')

0 comments on commit cb25b86

Please sign in to comment.