~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Robert Collins
  • Date: 2009-09-17 11:54:41 UTC
  • mto: This revision was merged to the branch mainline in revision 4700.
  • Revision ID: robertc@robertcollins.net-20090917115441-2ug57z6eyrnb6zim
Add stronger test isolation by interception BzrDir.open and checking the thing being opened is known to the test suite.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    urlutils,
30
30
    )
31
31
from bzrlib.osutils import format_date
32
 
from bzrlib.tests import TestSkipped
 
32
from bzrlib.tests import TestSkipped, MemoryServer
33
33
from bzrlib.tests.blackbox import ExternalBase
34
34
 
35
35
 
40
40
        self._repo_strings = "2a or development-subtree"
41
41
 
42
42
    def test_info_non_existing(self):
43
 
        if sys.platform == "win32":
44
 
            location = "C:/i/do/not/exist/"
45
 
        else:
46
 
            location = "/i/do/not/exist/"
 
43
        self.vfs_transport_factory = MemoryServer
 
44
        location = self.get_url()
47
45
        out, err = self.run_bzr('info '+location, retcode=3)
48
46
        self.assertEqual(out, '')
49
47
        self.assertEqual(err, 'bzr: ERROR: Not a branch: "%s".\n' % location)