~ubuntu-branches/ubuntu/utopic/bzrtools/utopic

« back to all changes in this revision

Viewing changes to tests/shelf_tests.py

  • Committer: Package Import Robot
  • Author(s): Jelmer Vernooij
  • Date: 2012-04-13 12:06:17 UTC
  • mfrom: (659.15.18) (0.22.16 sid)
  • Revision ID: package-import@ubuntu.com-20120413120617-qa3qms2fybl2jivc
Tags: 2.5+bzr786-2
* Use rsvg-convert rather than rsvg. Closes: #666472, LP: #971190
* Disable version check to allow use with bzr 2.6.
* Remove Arnaud Fontaine and Gustavo Franco from uploaders.
* Fix Vcs-Bzr URL.
* Add 03_testing: fix test suite run with newer versions of bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
+hello test world
34
34
 
35
35
"""
36
 
    def setUp(self):
37
 
        bzrlib.tests.TestCaseWithTransport.setUp(self)
38
 
        command._testing = True
39
 
        self.addCleanup(command._stop_testing)
40
36
 
41
37
    def _check_diff(self, diff=DIFF_1, filename='test_file'):
42
38
        old_tree = self.tree.basis_tree()
44
40
        self.tree.lock_read()
45
41
        try:
46
42
            old_date = _patch_header_date(old_tree,
47
 
                                          old_tree.inventory.path2id(filename),
 
43
                                          old_tree.path2id(filename),
48
44
                                          filename)
49
45
            new_date = _patch_header_date(self.tree,
50
 
                self.tree.inventory.path2id(filename), filename)
 
46
                self.tree.path2id(filename), filename)
51
47
        finally:
52
48
            self.tree.unlock()
53
49
            old_tree.unlock()
63
59
        old_tree.lock_read()
64
60
        try:
65
61
            old_date = _patch_header_date(old_tree,
66
 
                                          old_tree.inventory.path2id(filename),
 
62
                                          old_tree.path2id(filename),
67
63
                                          filename)
68
64
        finally:
69
65
            old_tree.unlock()
96
92
            self.tree.lock_write()
97
93
            try:
98
94
                new_date = _patch_header_date(self.tree,
99
 
                    self.tree.inventory.path2id('test_file'), 'test_file')
 
95
                    self.tree.path2id('test_file'), 'test_file')
100
96
            finally:
101
97
                self.tree.unlock()
102
98
 
337
333
            f.write(self.MODIFIED)
338
334
            f.close()
339
335
            new_date = _patch_header_date(self.tree,
340
 
                self.tree.inventory.path2id('test_file'), 'test_file')
 
336
                self.tree.path2id('test_file'), 'test_file')
341
337
        finally:
342
338
            self.tree.unlock()
343
339
 
438
434
        self.tree.lock_read()
439
435
        try:
440
436
            old_date = _patch_header_date(old_tree,
441
 
                old_tree.inventory.path2id('test_file'),
 
437
                old_tree.path2id('test_file'),
442
438
                                          'test_file')
443
439
            new_date = _patch_header_date(self.tree,
444
 
                self.tree.inventory.path2id('test_file'), 'test_file')
 
440
                self.tree.path2id('test_file'), 'test_file')
445
441
        finally:
446
442
            old_tree.unlock()
447
443
            self.tree.unlock()