/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 breezy/tests/test_bedding.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-06-12 01:45:56 UTC
  • mfrom: (7513.1.2 pypy3)
  • Revision ID: breezy.the.bot@gmail.com-20200612014556-tsc8assk3d0luziu
Avoid deprecated behaviour in ElementTree.

Merged from https://code.launchpad.net/~jelmer/brz/pypy3/+merge/385611

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
import os
21
21
import sys
22
22
 
23
 
from ..sixish import (
24
 
    text_type,
25
 
    )
26
23
from .. import (
27
24
    bedding,
28
25
    osutils,
56
53
        self.assertEqual(bedding.config_dir(), self.brz_home)
57
54
 
58
55
    def test_config_dir_is_unicode(self):
59
 
        self.assertIsInstance(bedding.config_dir(), text_type)
 
56
        self.assertIsInstance(bedding.config_dir(), str)
60
57
 
61
58
    def test_config_path(self):
62
59
        self.assertEqual(bedding.config_path(),
84
81
        self.assertEqual(bedding.config_dir(), self.bzr_home)
85
82
 
86
83
    def test_config_dir_is_unicode(self):
87
 
        self.assertIsInstance(bedding.config_dir(), text_type)
 
84
        self.assertIsInstance(bedding.config_dir(), str)
88
85
 
89
86
    def test_config_path(self):
90
87
        self.assertEqual(bedding.config_path(),
126
123
        os.makedirs(newdir)
127
124
        self.assertEqual(bedding.config_dir(), newdir)
128
125
 
 
126
    def test_ensure_config_dir_exists(self):
 
127
        xdgconfigdir = osutils.pathjoin(self.test_home_dir, 'xdgconfig')
 
128
        self.overrideEnv('XDG_CONFIG_HOME', xdgconfigdir)
 
129
        bedding.ensure_config_dir_exists()
 
130
        newdir = osutils.pathjoin(xdgconfigdir, 'breezy')
 
131
        self.assertTrue(os.path.isdir(newdir))
 
132
 
129
133
 
130
134
class TestDefaultMailDomain(tests.TestCaseInTempDir):
131
135
    """Test retrieving default domain from mailname file"""