~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/developers/testing.txt

  • Committer: Jelmer Vernooij
  • Date: 2012-02-20 12:19:29 UTC
  • mfrom: (6437.23.11 2.5)
  • mto: (6581.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6582.
  • Revision ID: jelmer@samba.org-20120220121929-7ni2psvjoatm1yp4
Merge bzr/2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
745
745
        _test_needs_features = [features.apport]
746
746
 
747
747
 
 
748
Testing translations
 
749
-----------------------
 
750
 
 
751
Translations are disabled by default in tests.  If you want to test
 
752
that code is translated you can use the ``ZzzTranslations`` class from
 
753
``test_i18n``::
 
754
 
 
755
    self.overrideAttr(i18n, '_translations', ZzzTranslations())
 
756
 
 
757
And check the output strings look like ``u"zz\xe5{{output}}"``.
 
758
 
 
759
To test the gettext setup and usage you override i18n.installed back
 
760
to self.i18nInstalled and _translations to None, see
 
761
test_i18n.TestInstall.
 
762
 
 
763
 
748
764
Testing deprecated code
749
765
-----------------------
750
766