File: test_utils.py

package info (click to toggle)
python-carrot 0.10.5-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 492 kB
  • ctags: 508
  • sloc: python: 2,477; makefile: 75
file content (14 lines) | stat: -rw-r--r-- 354 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import unittest

from carrot import utils


class TestUtils(unittest.TestCase):

    def test_partition_unicode(self):
        s = u'hi mom'
        self.assertEqual(utils.partition(s, ' '), (u'hi', u' ', u'mom'))

    def test_rpartition_unicode(self):
        s = u'hi mom !'
        self.assertEqual(utils.rpartition(s, ' '), (u'hi mom', u' ', u'!'))