~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-09-18 02:51:19 UTC
  • mfrom: (4691.2.5 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090918025119-eqkrmtj09t2hqs2t
(robertc) Add test suite enforcement of BzrDir objects outside the
        test area. (Robert Collins)

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 import (
26
 
    config,
27
 
    tests,
28
 
    )
29
 
 
30
 
 
31
 
class TestCat(tests.TestCaseWithTransport):
 
25
from bzrlib.tests import MemoryServer, TestCaseWithTransport
 
26
 
 
27
 
 
28
class TestCat(TestCaseWithTransport):
32
29
 
33
30
    def test_cat(self):
34
31
        tree = self.make_branch_and_tree('branch')
187
184
        self.assertEqual('contents of README\n', out)
188
185
 
189
186
    def test_cat_nonexistent_branch(self):
190
 
        if sys.platform == "win32":
191
 
            location = "C:/i/do/not/exist"
192
 
        else:
193
 
            location = "/i/do/not/exist"
194
 
        self.run_bzr_error(['^bzr: ERROR: Not a branch'], ['cat', location])
 
187
        self.vfs_transport_factory = MemoryServer
 
188
        self.run_bzr_error(['^bzr: ERROR: Not a branch'], ['cat', self.get_url()])