~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_cat.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:
22
22
import os
23
23
import sys
24
24
 
25
 
from bzrlib.tests.blackbox import TestCaseWithTransport
 
25
from bzrlib.tests import MemoryServer, TestCaseWithTransport
26
26
 
27
27
class TestCat(TestCaseWithTransport):
28
28
 
182
182
        self.assertEqual('contents of README\n', out)
183
183
 
184
184
    def test_cat_nonexistent_branch(self):
185
 
        if sys.platform == "win32":
186
 
            location = "C:/i/do/not/exist"
187
 
        else:
188
 
            location = "/i/do/not/exist"
189
 
        self.run_bzr_error(['^bzr: ERROR: Not a branch'], ['cat', location])
 
185
        self.vfs_transport_factory = MemoryServer
 
186
        self.run_bzr_error(['^bzr: ERROR: Not a branch'], ['cat', self.get_url()])