Package translate :: Package convert :: Module test_po2dtd :: Class TestPO2DTD

[hide private]
[frames] | no frames]

# Class TestPO2DTD

source code

Known Subclasses:
  - TestPO2DTDCommand

Instance Methods | [hide private]

setup_method(self, method) | source code

teardown_method(self, method) | source code

po2dtd(self, posource) helper that converts po source to dtd source without requiring files | source code

merge2dtd(self, dtdsource, posource) helper that merges po translations to dtd source without requiring files | source code

convertdtd(self, posource, dtdtemplate) helper to exercise the command line function | source code

roundtripsource(self, dtdsource) converts dtd source to po and back again, returning the resulting source | source code

roundtripstring(self, entitystring) Just takes the contents of a ENTITY definition (with quotes) and does a roundtrip on that | source code

check_roundtrip(self, dtdsource) Checks that the round-tripped string is the same as the original | source code

test_joinlines(self) tests that po lines are joined seamlessly (bug 16) | source code

test_escapedstr(self) tests that in msgstr is escaped correctly in dtd | source code

test_ampersandwarning(self) tests that proper warnings are given if invalid ampersands occur | source code

test_missingaccesskey(self) tests that proper warnings are given if access key is missing | source code

test_accesskeycase(self) tests that access keys come out with the same case as the original, regardless | source code

test_accesskey_types(self) tests that we can detect the various styles of accesskey | source code

test_ampersandfix(self) tests that invalid ampersands are fixed in the dtd | source code

test_entities_two(self) test the error ouput when we find two entities | source code

test_entities(self) tests that entities are correctly idnetified in the dtd | source code

test_comments_translator(self) tests for translator comments | source code

test_retains_hashprefix(self) tests that hash prefixes in the dtd are retained | source code

test_convertdtd(self) checks that the convertdtd function is working | source code

test_newlines_escapes(self) check that we can handle a in the PO file | source code

test_roundtrip_simple(self) checks that simple strings make it through a dtd->po->dtd roundtrip | source code

test_roundtrip_escape(self) checks that escapes in strings make it through a dtd->po->dtd roundtrip | source code

test_roundtrip_quotes(self) checks that (escaped) quotes in strings make it through a dtd->po->dtd roundtrip | source code

test_merging_entries_with_spaces_removed(self) dtd2po removes pretty printed spaces, this tests that we can merge this back into the pretty printed dtd | source code

test_comments(self) test that we preserve comments, bug 351 | source code