~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/developers/testing.txt

  • Committer: Patch Queue Manager
  • Date: 2016-02-01 19:13:13 UTC
  • mfrom: (6614.2.2 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20160201191313-wdfvmfff1djde6oq
(vila) Release 2.7.0 (Vincent Ladeuil)

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