def test_serialization(self): pronoun_1 = Pronoun.create_from_baseword(morph, u'он') data = pronoun_1.serialize() pronoun_2 = Pronoun.deserialize(data) self.assertEqual(pronoun_1.normalized , pronoun_2.normalized) self.assertEqual(pronoun_1.forms, pronoun_2.forms) self.assertEqual(pronoun_1.properties, pronoun_2.properties)
def test_serialization(self): pronoun_1 = Pronoun.create_from_baseword(morph, u'он') data = pronoun_1.serialize() pronoun_2 = Pronoun.deserialize(data) self.assertEqual(pronoun_1.normalized, pronoun_2.normalized) self.assertEqual(pronoun_1.forms, pronoun_2.forms) self.assertEqual(pronoun_1.properties, pronoun_2.properties)
def test_create_from_baseword(self): pronoun = Pronoun.create_from_baseword(morph, u'он') self.assertEqual(pronoun.normalized, u'он') self.assertEqual(pronoun.forms, (u'он', u'его', u'ему', u'его', u'им', u'нем', u'она', u'ее', u'ей', u'ее', u'ей', u'ней', u'оно', u'его', u'ему', u'его', u'им', u'нём', u'они', u'их', u'им', u'их', u'ими', u'них'))
def test_create_from_baseword(self): pronoun = Pronoun.create_from_baseword(morph, u'он') self.assertEqual(pronoun.normalized, u'он') self.assertEqual( pronoun.forms, (u'он', u'его', u'ему', u'его', u'им', u'нем', u'она', u'ее', u'ей', u'ее', u'ей', u'ней', u'оно', u'его', u'ему', u'его', u'им', u'нём', u'они', u'их', u'им', u'их', u'ими', u'них'))