Recent Issues
|
Sign in
with your
Google
Account to create issues and add comments
Issue 65:
xliff2po & po2xliff should handle context
Unified Diff
File: translate/storage/test_pypo.py
Patch Set: A more complete patch, supporting CPO and pypo
Jump to:
Index: translate/storage/test_pypo.py
===================================================================
--- translate/storage/test_pypo.py (revision 7897)
+++ translate/storage/test_pypo.py (working copy)
@@ -141,6 +141,20 @@
print str(unit)
assert str(unit) == expected
+ def test_context(self):
+ """test context message"""
+ unit = self.UnitClass("Test")
+ #XXX: getcontext() also returns other comments, this is will not be
+ # tested here
+ assert unit.getcontext() == ''
+
+ unit.setcontext("test context")
+ assert unit.getcontext() == "test context"
+
+ unit.setcontext("")
+ assert unit.getcontext() == ""
+
+
class TestPYPOFile(test_po.TestPOFile):
StoreClass = pypo.pofile
def test_combine_msgidcomments(self):