~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_shared_repository.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-04-13 22:37:15 UTC
  • mfrom: (1658.1.10 bzr.mbp.integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060413223715-b826d3cb591fed82
(mbp) fix #38331, #3619

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005 by Canonical Ltd
 
1
# Copyright (C) 2005, 2006 by 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
20
20
 
21
21
from bzrlib.tests import TestCaseInTempDir
22
22
import bzrlib.bzrdir
 
23
from bzrlib.bzrdir import BzrDir
23
24
import bzrlib.errors as errors
24
25
 
25
26
class TestSharedRepo(TestCaseInTempDir):
33
34
        self.assertRaises(errors.NotBranchError, dir.open_branch)
34
35
        self.assertRaises(errors.NoWorkingTree, dir.open_workingtree)        
35
36
 
 
37
    def test_init_repo_existing_dir(self):
 
38
        """Make repo in existing directory.
 
39
        
 
40
        (Malone #38331)
 
41
        """
 
42
        out, err = self.run_bzr("init-repository", ".")
 
43
        dir = BzrDir.open('.')
 
44
        self.assertTrue(dir.open_repository())
 
45
 
36
46
    def test_init(self):
37
47
        self.run_bzr("init-repo", "a")
38
48
        self.run_bzr("init", "--format=metadir", "a/b")