Skip to content

Commit

Permalink
- Using Python's doctest module instead of depreacted ``zope.test…
Browse files Browse the repository at this point in the history
…ing.doctest``.
  • Loading branch information
Michael Howitz committed Sep 25, 2010
1 parent b95fb50 commit d9dceb4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions CHANGES.txt
Expand Up @@ -5,8 +5,8 @@ CHANGES
3.6.3 (unreleased)
------------------

- Nothing changed yet.

- Using Python's ``doctest`` module instead of depreacted
``zope.testing.doctest``.

3.6.2 (2010-07-31)
------------------
Expand Down
16 changes: 7 additions & 9 deletions src/zope/app/locales/tests.py
Expand Up @@ -11,21 +11,19 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Tests for the message string extraction tool.
"""Tests for the message string extraction tool."""

$Id$
"""
import os
import doctest
import unittest
from zope.testing.doctest import DocTestSuite


class TestIsUnicodeInAllCatalog(unittest.TestCase):
"""
"""
def setUp(self):
pass

def test_is_unicode(self):
from zope.i18n.gettextmessagecatalog import GettextMessageCatalog
path = os.path.dirname(__file__)
Expand All @@ -39,16 +37,16 @@ def test_is_unicode(self):
mcatalog = GettextMessageCatalog(lang, 'zope',
os.path.join(lc_path, f))
catalog = mcatalog._catalog
self.failUnless(catalog._charset,
u"""Charset value for the Message catalog is missing.
The language is %s (zope.po).
self.failUnless(catalog._charset,
u"""Charset value for the Message catalog is missing.
The language is %s (zope.po).
Value of the message catalog should be in unicode""" % (lang,)
)


def test_suite():
return unittest.TestSuite((
DocTestSuite('zope.app.locales.extract',
doctest.DocTestSuite('zope.app.locales.extract',
optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,),
unittest.makeSuite(TestIsUnicodeInAllCatalog),
))
Expand Down

0 comments on commit d9dceb4

Please sign in to comment.