~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to tests/test_cbranch.py

  • Committer: Max Bowsher
  • Date: 2009-11-07 16:59:01 UTC
  • mto: (733.2.1 fix-version-check)
  • mto: This revision was merged to the branch mainline in revision 734.
  • Revision ID: maxb@f2s.com-20091107165901-00i9ajka4oxf3wzo
Use bzrtools' preformatted version string, rather than erroneously assuming version_info is always a 3-tuple.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from unittest import makeSuite
 
2
 
 
3
from bzrlib.config import LocationConfig
 
4
from bzrlib import osutils
 
5
from bzrlib.tests import TestCaseWithTransport
 
6
 
 
7
from bzrlib.plugins.bzrtools.cbranch import cbranch
 
8
 
 
9
 
 
10
class TestCBranch(TestCaseWithTransport):
 
11
 
 
12
    def test_cbranch_creates_containing_dirs(self):
 
13
        source = self.make_branch_and_tree('source')
 
14
        config = LocationConfig(osutils.abspath('target'))
 
15
        config.set_user_option('cbranch_target',
 
16
                               'directory/subdirectory/target_branch')
 
17
        cbranch('source', 'target')
 
18
        self.failUnlessExists('directory/subdirectory/target_branch')
 
19
 
 
20
 
 
21
def test_suite():
 
22
    return makeSuite(TestBzrTools)