Ejemplo n.º 1
0
 def test_same_translation(self):
     expected = 'Out of memory'
     actual = translate_message('Out of memory')
     assert actual == expected
Ejemplo n.º 2
0
 def test_basic_translation(self):
     actual = "Type mismatch"
     expected = translate_message("Typenkonflikt")
     assert actual == expected
Ejemplo n.º 3
0
 def test_unicode_translation(self):
     expected = 'Division by zero'
     actual = translate_message(u'Divisi\xf3n por cero')
     assert actual == expected
Ejemplo n.º 4
0
 def test_interpolated_translation_with_type_and_colon(self):
     expected = 'ReferenceError: Cannot modify property \'foo\': \'length\' is not writable'
     actual = translate_message(
         u'ReferenceError: Nie mo\u017cna zmodyfikowa\u0107 w\u0142a\u015bciwo\u015bci \u201efoo\u201d: warto\u015b\u0107 \u201elength\u201d jest niezapisywalna'
     )
     assert actual == expected
Ejemplo n.º 5
0
 def test_same_translation(self):
     expected = 'Out of memory'
     actual = translate_message('Out of memory')
     assert actual == expected
Ejemplo n.º 6
0
 def test_translation_with_type_and_colon(self):
     expected = 'RangeError: Cannot define property: object is not extensible'
     actual = translate_message(
         u'RangeError: Nie mo\u017cna zdefiniowa\u0107 w\u0142a\u015bciwo\u015bci: obiekt nie jest rozszerzalny'
     )
     assert actual == expected
Ejemplo n.º 7
0
 def test_interpolated_translation_with_colon_in_front(self):
     expected = 'foo: an unexpected failure occurred while trying to obtain metadata information'
     actual = translate_message(
         u'foo: wyst\u0105pi\u0142 nieoczekiwany b\u0142\u0105d podczas pr\xf3by uzyskania informacji o metadanych'
     )
     assert actual == expected
Ejemplo n.º 8
0
 def test_interpolated_translation_with_type(self):
     expected = 'TypeError: Type \'foo\' not found'
     actual = translate_message(u'TypeError: Nie odnaleziono typu \u201efoo\u201d')
     assert actual == expected
Ejemplo n.º 9
0
 def test_interpolated_translation_with_type_and_colon(self):
     expected = 'ReferenceError: Cannot modify property \'foo\': \'length\' is not writable'
     actual = translate_message(
         u'ReferenceError: Nie mo\u017cna zmodyfikowa\u0107 w\u0142a\u015bciwo\u015bci \u201efoo\u201d: warto\u015b\u0107 \u201elength\u201d jest niezapisywalna')
     assert actual == expected
Ejemplo n.º 10
0
 def test_interpolated_translation_with_colon(self):
     expected = '\'this\' is not of expected type: foo'
     actual = translate_message(
         u'Typ obiektu \u201ethis\u201d jest inny ni\u017c oczekiwany: foo')
     assert actual == expected
Ejemplo n.º 11
0
 def test_interpolated_translation_with_colon_in_front(self):
     expected = 'foo: an unexpected failure occurred while trying to obtain metadata information'
     actual = translate_message(
         u'foo: wyst\u0105pi\u0142 nieoczekiwany b\u0142\u0105d podczas pr\xf3by uzyskania informacji o metadanych')
     assert actual == expected
Ejemplo n.º 12
0
 def test_translation_with_type_and_colon(self):
     expected = 'RangeError: Cannot define property: object is not extensible'
     actual = translate_message(
         u'RangeError: Nie mo\u017cna zdefiniowa\u0107 w\u0142a\u015bciwo\u015bci: obiekt nie jest rozszerzalny')
     assert actual == expected
Ejemplo n.º 13
0
 def test_translation_with_type(self):
     expected = 'RangeError: Subscript out of range'
     actual = translate_message('RangeError: Indeks poza zakresem')
     assert actual == expected
Ejemplo n.º 14
0
 def test_unknown_translation(self):
     expected = 'Some unknown message'
     actual = translate_message('Some unknown message')
     assert actual == expected
Ejemplo n.º 15
0
 def test_unknown_translation(self):
     expected = 'Some unknown message'
     actual = translate_message('Some unknown message')
     assert actual == expected
Ejemplo n.º 16
0
 def test_basic_translation(self):
     actual = 'Type mismatch'
     expected = translate_message('Typenkonflikt')
     assert actual == expected
Ejemplo n.º 17
0
 def test_translation_with_type(self):
     expected = 'RangeError: Subscript out of range'
     actual = translate_message('RangeError: Indeks poza zakresem')
     assert actual == expected
Ejemplo n.º 18
0
 def test_same_translation(self):
     expected = "Out of memory"
     actual = translate_message("Out of memory")
     assert actual == expected
Ejemplo n.º 19
0
 def test_interpolated_translation_with_colon(self):
     expected = '\'this\' is not of expected type: foo'
     actual = translate_message(
         u'Typ obiektu \u201ethis\u201d jest inny ni\u017c oczekiwany: foo')
     assert actual == expected
Ejemplo n.º 20
0
 def test_unknown_translation(self):
     expected = "Some unknown message"
     actual = translate_message("Some unknown message")
     assert actual == expected
Ejemplo n.º 21
0
 def test_interpolated_translation_with_type(self):
     expected = 'TypeError: Type \'foo\' not found'
     actual = translate_message(
         u'TypeError: Nie odnaleziono typu \u201efoo\u201d')
     assert actual == expected
Ejemplo n.º 22
0
 def test_interpolated_translation_with_type(self):
     expected = "TypeError: Type 'foo' not found"
     actual = translate_message(
         "TypeError: Nie odnaleziono typu \u201efoo\u201d")
     assert actual == expected
Ejemplo n.º 23
0
 def test_basic_translation(self):
     actual = 'Type mismatch'
     expected = translate_message('Typenkonflikt')
     assert actual == expected
Ejemplo n.º 24
0
 def test_unicode_translation(self):
     expected = 'Division by zero'
     actual = translate_message(u'Divisi\xf3n por cero')
     assert actual == expected