~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2009-09-24 19:26:45 UTC
  • mto: (4634.52.3 2.0)
  • mto: This revision was merged to the branch mainline in revision 4716.
  • Revision ID: john@arbash-meinel.com-20090924192645-hyy1ycnnk6u3j5j6
Catch a corner case that we were missing.
The CHKInventory tests were passing, but failed for test_inv because
we were passing None to _getitems(). That only failed for InternalNodes,
but we were using a structure that didn't have internal nodes.
So now the test is parameterized on a small CHKInventory page size
to force those things out into the open.

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, MemoryServer
 
32
from bzrlib.tests import TestSkipped
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
 
        self.vfs_transport_factory = MemoryServer
44
 
        location = self.get_url()
 
43
        if sys.platform == "win32":
 
44
            location = "C:/i/do/not/exist/"
 
45
        else:
 
46
            location = "/i/do/not/exist/"
45
47
        out, err = self.run_bzr('info '+location, retcode=3)
46
48
        self.assertEqual(out, '')
47
49
        self.assertEqual(err, 'bzr: ERROR: Not a branch: "%s".\n' % location)
1326
1328
    def test_info_locking_oslocks(self):
1327
1329
        if sys.platform == "win32":
1328
1330
            raise TestSkipped("don't use oslocks on win32 in unix manner")
1329
 
        # This test tests old (all-in-one, OS lock using) behaviour which
1330
 
        # simply cannot work on windows (and is indeed why we changed our
1331
 
        # design. As such, don't try to remove the thisFailsStrictLockCheck
1332
 
        # call here.
1333
1331
        self.thisFailsStrictLockCheck()
1334
1332
 
1335
1333
        tree = self.make_branch_and_tree('branch',