~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_rules.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-09-21 10:48:23 UTC
  • mfrom: (5393.6.3 bzr)
  • Revision ID: pqm@pqm.ubuntu.com-20100921104823-0jks3g5o1bahesyq
(spiv) Fix traceback with python 2.7's xmlrpclib. (Toshio Kuratomi)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2008-2011 Canonical Ltd
 
1
# Copyright (C) 2008 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
16
16
 
17
17
"""Tests for finding, parsing and searching rule-based preferences."""
18
18
 
 
19
import os
19
20
import sys
20
21
 
21
22
from bzrlib import (
 
23
    config,
22
24
    errors,
23
25
    rules,
24
26
    tests,
25
27
    )
 
28
from bzrlib.util.configobj import configobj
26
29
 
27
30
 
28
31
class TestIniBasedRulesSearcher(tests.TestCase):
115
118
 
116
119
    def setUp(self):
117
120
        super(TestRulesPath, self).setUp()
118
 
        self.overrideEnv('HOME', '/home/bogus')
 
121
        os.environ['HOME'] = '/home/bogus'
119
122
        if sys.platform == 'win32':
120
 
            self.overrideEnv(
121
 
                'BZR_HOME', r'C:\Documents and Settings\bogus\Application Data')
 
123
            os.environ['BZR_HOME'] = \
 
124
                r'C:\Documents and Settings\bogus\Application Data'
122
125
            self.bzr_home = \
123
126
                'C:/Documents and Settings/bogus/Application Data/bazaar/2.0'
124
127
        else: