Example #1
0
 def test_to_base_placeables(self):
     basetree = base.to_base_placeables(self.elem)
     # The following asserts say that, even though tree and newtree represent the same string
     # (the unicode() results are the same), they are composed of different classes (and so
     # their repr()s are different
     assert unicode(self.elem) == unicode(basetree)
     assert repr(self.elem) != repr(basetree)
Example #2
0
 def test_to_base_placeables(self):
     basetree = base.to_base_placeables(self.elem)
     # The following asserts say that, even though tree and newtree represent the same string
     # (the unicode() results are the same), they are composed of different classes (and so
     # their repr()s are different
     assert unicode(self.elem) == unicode(basetree)
     assert repr(self.elem) != repr(basetree)
Example #3
0
    def test_to_xliff_placeables(self):
        basetree = base.to_base_placeables(self.elem)
        xliff_from_base = xliff.to_xliff_placeables(basetree)
        assert unicode(xliff_from_base) != unicode(self.elem)
        assert repr(xliff_from_base) != repr(self.elem)

        xliff_from_gen = xliff.to_xliff_placeables(self.elem)
        assert unicode(xliff_from_gen) != unicode(self.elem)
        assert repr(xliff_from_gen) != repr(self.elem)

        assert unicode(xliff_from_base) == unicode(xliff_from_gen)
        assert repr(xliff_from_base) == repr(xliff_from_gen)
Example #4
0
    def DISABLED_test_to_xliff_placeables(self):
        basetree = base.to_base_placeables(self.elem)
        xliff_from_base = xliff.to_xliff_placeables(basetree)
        assert unicode(xliff_from_base) != unicode(self.elem)
        assert repr(xliff_from_base) != repr(self.elem)

        xliff_from_gen = xliff.to_xliff_placeables(self.elem)
        assert unicode(xliff_from_gen) != unicode(self.elem)
        assert repr(xliff_from_gen) != repr(self.elem)

        assert unicode(xliff_from_base) == unicode(xliff_from_gen)
        assert repr(xliff_from_base) == repr(xliff_from_gen)
    def test_to_xliff_placeables(self):
        basetree = base.to_base_placeables(self.elem)
        xliff_from_base = xliff.to_xliff_placeables(basetree)
        assert six.text_type(xliff_from_base) != six.text_type(self.elem)
        assert repr(xliff_from_base) != repr(self.elem)

        xliff_from_gen = xliff.to_xliff_placeables(self.elem)
        assert six.text_type(xliff_from_gen) != six.text_type(self.elem)
        assert repr(xliff_from_gen) != repr(self.elem)

        assert six.text_type(xliff_from_base) == six.text_type(xliff_from_gen)
        assert repr(xliff_from_base) == repr(xliff_from_gen)
Example #6
0
 def test_to_general_placeables(self):
     basetree = base.to_base_placeables(self.elem)
     gentree = general.to_general_placeables(basetree)
     assert gentree == self.elem
Example #7
0
 def test_to_general_placeables(self):
     basetree = base.to_base_placeables(self.elem)
     gentree = general.to_general_placeables(basetree)
     assert gentree == self.elem