/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Vincent Ladeuil
  • Date: 2008-10-02 06:18:42 UTC
  • mfrom: (3757 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3759.
  • Revision ID: v.ladeuil+lp@free.fr-20081002061842-4ctag1pkr7ua9gu2
Fix conflict. Related to moved lines, nice use case

Show diffs side-by-side

added added

removed removed

Lines of Context:
793
793
        Tests that want to use debug flags can just set them in the
794
794
        debug_flags set during setup/teardown.
795
795
        """
 
796
        self._preserved_debug_flags = set(debug.debug_flags)
796
797
        if 'allow_debug' not in selftest_debug_flags:
797
 
            self._preserved_debug_flags = set(debug.debug_flags)
798
798
            debug.debug_flags.clear()
799
 
            self.addCleanup(self._restore_debug_flags)
 
799
        self.addCleanup(self._restore_debug_flags)
800
800
 
801
801
    def _clear_hooks(self):
802
802
        # prevent hooks affecting tests
1401
1401
    def _run_bzr_core(self, args, retcode, encoding, stdin,
1402
1402
            working_dir):
1403
1403
        if encoding is None:
1404
 
            encoding = bzrlib.user_encoding
 
1404
            encoding = osutils.get_user_encoding()
1405
1405
        stdout = StringIOWrapper()
1406
1406
        stderr = StringIOWrapper()
1407
1407
        stdout.encoding = encoding
3240
3240
    possible_vals = [u'm\xb5', u'\xe1', u'\u0410']
3241
3241
    for uni_val in possible_vals:
3242
3242
        try:
3243
 
            str_val = uni_val.encode(bzrlib.user_encoding)
 
3243
            str_val = uni_val.encode(osutils.get_user_encoding())
3244
3244
        except UnicodeEncodeError:
3245
3245
            # Try a different character
3246
3246
            pass