~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_tree/test_get_file_mtime.py

  • Committer: Martin Packman
  • Date: 2012-01-05 09:50:04 UTC
  • mfrom: (6424 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6426.
  • Revision ID: martin.packman@canonical.com-20120105095004-mia9xb7y0efmto0v
Merge bzr.dev to resolve conflicts in bzrlib.builtins

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import time
20
20
 
 
21
from bzrlib import errors
 
22
 
21
23
from bzrlib.tests.per_tree import TestCaseWithTree
22
24
 
23
25
 
42
44
                        'now: %f, mtime_file_id: %f' % (now, mtime_file_id ))
43
45
        mtime_path = tree.get_file_mtime(file_id='one-id', path='one')
44
46
        self.assertEqual(mtime_file_id, mtime_path)
 
47
 
 
48
    def test_nonexistant(self):
 
49
        tree = self.get_basic_tree()
 
50
        tree.lock_read()
 
51
        self.addCleanup(tree.unlock)
 
52
        self.assertRaises(errors.NoSuchId,
 
53
            tree.get_file_mtime, file_id='unexistant')