# Path: pymorphy/py3k.py
# PY3 = sys.version_info[0] == 3
# 
# Path: pymorphy/templatetags/pymorphy_tags.py
# @register.filter
# def inflect(phrase, form):
#     if not phrase:
#         return phrase
#     return _process_unmarked_phrase(text_type(phrase), default_morph.inflect_ru, text_type(form))
# 
# @register.filter
# def plural(phrase, amount):
#     if not phrase:
#         return phrase
#     return _process_unmarked_phrase(phrase, default_morph.pluralize_inflected_ru, amount)
# 
# @register.filter
# def inflect_marked(phrase, form):
#     if not phrase:
#         return phrase
#     return _process_marked_phrase(text_type(phrase), default_morph.inflect_ru, text_type(form))


from unittest import TestCase
from django import template
from django.utils.translation import ugettext_lazy as _
from pymorphy.py3k import PY3
from .templatetags.pymorphy_tags import inflect, plural, inflect_marked
        self.assertInflected('[[Москва]]', 'пр', 'Москве')
        self.assertInflected('[[Москва]]-сити', 'пр', 'Москве-сити')

    def test_two_words_no_inflect(self):
        self.assertInflected('[[лошадь]] Пржевальского и [[красный конь]] Кузьмы Петрова-Водкина',
                             'дт',
                             'лошади Пржевальского и красному коню Кузьмы Петрова-Водкина')


class InflectTagTest(PymorphyDjangoTestCase):

    def assertInflected(self, phrase, form, result):
        inflected_word = inflect(phrase, form)
        err_msg = self._msg("%s != %s" , inflected_word, result)
        self.assertEqual(inflected_word, result, err_msg)

    def test_word_case(self):
        self.assertInflected('Котопес', '', 'Котопес')
        self.assertInflected('ВАСЯ', '', 'ВАСЯ')
        self.assertInflected('котопес', '', 'котопес')

    def test_one_word(self):
        self.assertInflected('Москва', 'пр', 'Москве')
        self.assertInflected('бутявка', 'мн,тв', 'бутявками')
        self.assertInflected('Петрович', 'дт,отч', 'Петровичу')

    def test_susliki(self):
        self.assertInflected('сусликов', 'тв', 'сусликами')

    def test_complex_phrase(self):

# Path: pymorphy/py3k.py
# PY3 = sys.version_info[0] == 3
# 
# Path: pymorphy/templatetags/pymorphy_tags.py
# @register.filter
# def inflect(phrase, form):
#     if not phrase:
#         return phrase
#     return _process_unmarked_phrase(text_type(phrase), default_morph.inflect_ru, text_type(form))
# 
# @register.filter
# def plural(phrase, amount):
#     if not phrase:
#         return phrase
#     return _process_unmarked_phrase(phrase, default_morph.pluralize_inflected_ru, amount)
# 
# @register.filter
# def inflect_marked(phrase, form):
#     if not phrase:
#         return phrase
#     return _process_marked_phrase(text_type(phrase), default_morph.inflect_ru, text_type(form))


# Path: pymorphy/tests.py
from unittest import TestCase
from django import template
from django.utils.translation import ugettext_lazy as _
from pymorphy.py3k import PY3
from .templatetags.pymorphy_tags import inflect, plural, inflect_marked

        self.assertInflected('[[Москва]]', 'пр', 'Москве')
        self.assertInflected('[[Москва]]-сити', 'пр', 'Москве-сити')

    def test_two_words_no_inflect(self):
        self.assertInflected('[[лошадь]] Пржевальского и [[красный конь]] Кузьмы Петрова-Водкина',
                             'дт',
                             'лошади Пржевальского и красному коню Кузьмы Петрова-Водкина')


class InflectTagTest(PymorphyDjangoTestCase):

    def assertInflected(self, phrase, form, result):
        inflected_word = inflect(phrase, form)
        err_msg = self._msg("%s != %s" , inflected_word, result)
        self.assertEqual(inflected_word, result, err_msg)

    def test_word_case(self):
        self.assertInflected('Котопес', '', 'Котопес')
        self.assertInflected('ВАСЯ', '', 'ВАСЯ')
        self.assertInflected('котопес', '', 'котопес')

    def test_one_word(self):
        self.assertInflected('Москва', 'пр', 'Москве')
        self.assertInflected('бутявка', 'мн,тв', 'бутявками')
        self.assertInflected('Петрович', 'дт,отч', 'Петровичу')

    def test_susliki(self):
        self.assertInflected('сусликов', 'тв', 'сусликами')

    def test_complex_phrase(self):

        self.assertInflected('тридцать восемь попугаев и Удав', 'дт',