From: Dwayne B. <dwa...@us...> - 2006-01-30 20:55:03
|
Update of /cvsroot/translate/src/translate/filters In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10286 Modified Files: test_checks.py Log Message: Disabeled/commented out tests - Should eliminate must translate words from acronyms check. - Ability to find musttranslate words when prefixed New tests - Lots of musttranslate words surrounded by various punctuation Index: test_checks.py =================================================================== RCS file: /cvsroot/translate/src/translate/filters/test_checks.py,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- test_checks.py 30 Jan 2006 16:19:09 -0000 1.49 +++ test_checks.py 30 Jan 2006 20:54:53 -0000 1.50 @@ -56,6 +56,9 @@ assert checks.fails(stdchecker.acronyms, "An HTML file", "'n LMTH leer") # We don't mind if you add an acronym to correct bad capitalisation in the original assert checks.passes(stdchecker.acronyms, "An html file", "'n HTML leer") + # TODO We shouldn't worry about acronyms that appear in a musttranslate file + #stdchecker = checks.StandardChecker(checks.CheckerConfig(musttranslatewords=["OK"])) + #assert checks.passes(stdchecker.acronyms, "OK", "Kulungile") def test_blank(): """tests blank""" @@ -166,8 +169,15 @@ # check that we can find words surrounded by punctuation assert checks.passes(stdchecker.musttranslatewords, "Click 'Mozilla' button", "Kliek 'Motzille' knoppie") assert checks.fails(stdchecker.musttranslatewords, "Click 'Mozilla' button", "Kliek 'Mozilla' knoppie") + assert checks.passes(stdchecker.musttranslatewords, 'Click "Mozilla" button', 'Kliek "Motzille" knoppie') + assert checks.fails(stdchecker.musttranslatewords, 'Click "Mozilla" button', 'Kliek "Mozilla" knoppie') + assert checks.passes(stdchecker.musttranslatewords, "Click (Mozilla) button", "Kliek (Motzille) knoppie") + assert checks.fails(stdchecker.musttranslatewords, "Click (Mozilla) button", "Kliek (Mozilla) knoppie") assert checks.passes(stdchecker.musttranslatewords, "Click Mozilla!", "Kliek Motzille!") assert checks.fails(stdchecker.musttranslatewords, "Click Mozilla!", "Kliek Mozilla!") + ## We need to define more word separators to allow us to find those hidden untranslated items + #assert checks.fails(stdchecker.musttranslatewords, "Click OK", "Blah we-OK") + def test_notranslatewords(): """tests stopwords""" @@ -187,6 +197,7 @@ assert checks.passes(stdchecker.musttranslatewords, "Click 'Mozilla' button", "Kliek 'Mozilla' knoppie") assert checks.fails(stdchecker.musttranslatewords, "Click Mozilla!", "Kliek Motzille!") assert checks.passes(stdchecker.musttranslatewords, "Click Mozilla!", "Kliek Mozilla!") + assert checks.fails(stdchecker.musttranslatewords, "Searches (From Opera)", "adosako (kusukela ku- Ophera)") def test_numbers(): """test numbers""" |