/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/per_workingtree/test_is_ignored.py

  • Committer: Martin
  • Date: 2019-06-16 01:03:51 UTC
  • mto: This revision was merged to the branch mainline in revision 7340.
  • Revision ID: gzlist@googlemail.com-20190616010351-uz89ydnwdoal4ve4
Split non-ini config methods to bedding

Functions that determine filesystem paths to use for config and default
username are now outside of the main (large) config module.

Also move cache_dir function from osutils and normalise logic.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# along with this program; if not, write to the Free Software
16
16
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
17
 
18
 
from breezy import config, ignores, tests
 
18
from breezy import (
 
19
    bedding,
 
20
    ignores,
 
21
    tests,
 
22
    )
19
23
from breezy.tests.per_workingtree import TestCaseWithWorkingTree
20
24
 
21
25
 
29
33
 
30
34
    def _set_user_ignore_content(self, ignores):
31
35
        """Create user ignore file and set its content to ignores."""
32
 
        config.ensure_config_dir_exists()
33
 
        user_ignore_file = config.user_ignore_config_filename()
 
36
        bedding.ensure_config_dir_exists()
 
37
        user_ignore_file = bedding.user_ignore_config_path()
34
38
        with open(user_ignore_file, 'wb') as f:
35
39
            f.write(ignores)
36
40
 
136
140
    def test_global_ignored(self):
137
141
        tree = self.make_branch_and_tree('.')
138
142
 
139
 
        config.ensure_config_dir_exists()
140
 
        user_ignore_file = config.user_ignore_config_filename()
 
143
        bedding.ensure_config_dir_exists()
 
144
        user_ignore_file = bedding.user_ignore_config_path()
141
145
        self._set_user_ignore_content(
142
146
            b'*.py[co]\n'
143
147
            b'./.shelf\n'