| 1 | # -*- coding: iso-8859-15 -*- |
|---|
| 2 | # Copyright (c) 2006 Nuxeo SAS <http://nuxeo.com> |
|---|
| 3 | # Authors : Tarek Ziadé <tziade@nuxeo.com> |
|---|
| 4 | # This program is free software; you can redistribute it and/or modify |
|---|
| 5 | # it under the terms of the GNU General Public License version 2 as published |
|---|
| 6 | # by the Free Software Foundation. |
|---|
| 7 | # |
|---|
| 8 | # This program is distributed in the hope that it will be useful, |
|---|
| 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 11 | # GNU General Public License for more details. |
|---|
| 12 | # |
|---|
| 13 | # You should have received a copy of the GNU General Public License |
|---|
| 14 | # along with this program; if not, write to the Free Software |
|---|
| 15 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
|---|
| 16 | # 02111-1307, USA. |
|---|
| 17 | # |
|---|
| 18 | # $Id: tests.py 46715 2006-06-22 11:47:59Z tziade $ |
|---|
| 19 | import doctest |
|---|
| 20 | import unittest |
|---|
| 21 | |
|---|
| 22 | def test_suite(): |
|---|
| 23 | options = doctest.ELLIPSIS |
|---|
| 24 | tests = [] |
|---|
| 25 | |
|---|
| 26 | try: |
|---|
| 27 | from zopyx.txng3 import stemmer |
|---|
| 28 | except ImportError: |
|---|
| 29 | # module not available |
|---|
| 30 | return unittest.TestSuite(tests) |
|---|
| 31 | |
|---|
| 32 | tests.append(doctest.DocFileTest('tokenizer.txt', |
|---|
| 33 | optionflags=doctest.ELLIPSIS)) |
|---|
| 34 | |
|---|
| 35 | return unittest.TestSuite(tests) |
|---|
| 36 | |
|---|
| 37 | if __name__ == '__main__': |
|---|
| 38 | import unittest |
|---|
| 39 | unittest.main(defaultTest='test_suite') |
|---|