Recent Issues
|
Sign in
with your
Google
Account to create issues and add comments
Issue 101:
Add setcontext method in PO storage classes
Unified Diff
File: translate/storage/test_po.py
Patch Set:
Jump to:
Index: translate/storage/test_po.py
===================================================================
--- translate/storage/test_po.py (revision 8228)
+++ translate/storage/test_po.py (working copy)
@@ -130,6 +130,16 @@
unit.source = u"Goeiemôre"
assert not unit.isheader()
+ def test_context(self):
+ unit = self.UnitClass("Message")
+ assert unit.getcontext() == u""
+
+ unit.setcontext("context message")
+ assert unit.getcontext() == u"context message"
+
+ unit.setcontext("")
+ assert unit.getcontext() == u""
+
class TestPOFile(test_base.TestTranslationStore):
StoreClass = po.pofile
def poparse(self, posource):