Trees | Indices | Help |
|
---|
|
1 #!/usr/bin/env python 2 3 from translate.storage import tbx 4 from translate.storage import test_base 5 8 911 StoreClass = tbx.tbxfile4013 tbxfile = tbx.tbxfile() 14 assert tbxfile.units == [] 15 tbxfile.addsourceunit("Bla") 16 assert len(tbxfile.units) == 1 17 newfile = tbx.tbxfile.parsestring(str(tbxfile)) 18 print str(tbxfile) 19 assert len(newfile.units) == 1 20 assert newfile.units[0].source == "Bla" 21 assert newfile.findunit("Bla").source == "Bla" 22 assert newfile.findunit("dit") is None2325 tbxfile = tbx.tbxfile() 26 tbxunit = tbxfile.addsourceunit("Concept") 27 tbxunit.source = "Term" 28 newfile = tbx.tbxfile.parsestring(str(tbxfile)) 29 print str(tbxfile) 30 assert newfile.findunit("Concept") is None 31 assert newfile.findunit("Term") is not None32
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Sep 23 13:51:21 2008 | http://epydoc.sourceforge.net |