File: test_cbranch.py

package info (click to toggle)
bzrtools 2.6.0-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 740 kB
  • sloc: python: 4,299; sh: 13; makefile: 10
file content (22 lines) | stat: -rw-r--r-- 690 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from unittest import makeSuite

from bzrlib.config import LocationConfig
from bzrlib import osutils
from bzrlib.tests import TestCaseWithTransport

from bzrlib.plugins.bzrtools.cbranch import cbranch


class TestCBranch(TestCaseWithTransport):

    def test_cbranch_creates_containing_dirs(self):
        source = self.make_branch_and_tree('source')
        config = LocationConfig(osutils.abspath('target'))
        config.set_user_option('cbranch_target',
                               'directory/subdirectory/target_branch')
        cbranch('source', 'target')
        self.assertPathExists('directory/subdirectory/target_branch')


def test_suite():
    return makeSuite(TestBzrTools)