~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revisiontree.py

  • Committer: Vincent Ladeuil
  • Date: 2010-02-09 16:40:30 UTC
  • mto: (5029.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5030.
  • Revision ID: v.ladeuil+lp@free.fr-20100209164030-oa6bos3m5fshecp0
Create a tests.test_server.TestServer class out of transport.Server (while retaining the later for some special non-tests usages).

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
"""Tests for the RevisionTree class."""
19
19
 
20
20
from bzrlib import (
 
21
    errors,
21
22
    revision,
22
23
    )
23
24
import bzrlib
 
25
from bzrlib.inventory import ROOT_ID
24
26
from bzrlib.tests import TestCaseWithTransport
25
27
 
26
28
 
59
61
        null_tree = self.t.branch.repository.revision_tree(
60
62
            revision.NULL_REVISION)
61
63
        self.assertIs(None, null_tree.inventory.root)
 
64
 
 
65
    def test_get_file_mtime_ghost(self):
 
66
        file_id = iter(self.rev_tree).next()
 
67
        self.rev_tree.inventory[file_id].revision = 'ghostrev'
 
68
        self.assertRaises(errors.FileTimestampUnavailable, 
 
69
            self.rev_tree.get_file_mtime, file_id)