Package translate :: Package storage :: Module test_csvl10n

[hide private]
[frames] | no frames]

# Source Code for Module translate.storage.test_csvl10n

     1  #!/usr/bin/env python
     2
     3  from translate.storage import csvl10n
     4  from translate.storage import test_base
     5
     6 -class TestCSVUnit(test_base.TestTranslationUnit):
     7      UnitClass = csvl10n.csvunit
     8
     9 -class TestCSV(test_base.TestTranslationStore):
    10      StoreClass = csvl10n.csvfile
    11
    12 -    def test_singlequoting(self):
    13          """Tests round trip on single quoting at start of string"""
    14          store = self.StoreClass()
    15          unit1 = store.addsourceunit("Test 'String'")
    16          unit2 = store.addsourceunit("'Blessed' String")
    17          unit3 = store.addsourceunit("'Quoted String'")
    18          assert unit3.source == "'Quoted String'"
    19          newstore = self.reparse(store)
    20          self.check_equality(store, newstore)
    21          assert store.units[2] == newstore.units[2]
    22          assert str(store) == str(newstore)
    23