~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Aaron Bentley
  • Date: 2006-04-19 01:23:36 UTC
  • mfrom: (1669 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1673.
  • Revision ID: aaron.bentley@utoronto.ca-20060419012336-a74d3d2ea435d15f
Merge bzr.dev

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")