~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2012-02-20 12:19:29 UTC
  • mfrom: (6437.23.11 2.5)
  • mto: (6581.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6582.
  • Revision ID: jelmer@samba.org-20120220121929-7ni2psvjoatm1yp4
Merge bzr/2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import os
20
20
 
 
21
from bzrlib import errors
21
22
from bzrlib.tests.per_workingtree import TestCaseWithWorkingTree
22
23
 
23
24
 
98
99
            self.assertAlmostEqual(st.st_mtime, mtime)
99
100
        finally:
100
101
            tree.unlock()
 
102
 
 
103
    def test_missing(self):
 
104
        tree = self.make_basic_tree()
 
105
 
 
106
        os.remove('tree/one')
 
107
        tree.lock_read()
 
108
        try:
 
109
            self.assertRaises(errors.FileTimestampUnavailable,
 
110
                tree.get_file_mtime, file_id='one-id')
 
111
        finally:
 
112
            tree.unlock()
 
113