/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/workingtree_implementations/test_workingtree.py

  • Committer: Martin Pool
  • Date: 2006-06-06 08:09:09 UTC
  • mto: This revision was merged to the branch mainline in revision 1799.
  • Revision ID: mbp@sourcefrog.net-20060606080909-f7c9ea6defe2e751
Remove Scratch objects used by doctests

Some old doctests rely on special Scratch object which clean up
temporary directory when they're deleted.  This is a bit undesirable
because deletion is not predictable and the classes aren't used enough
to be worthwhile.

 * Remove ScratchBranch, ScratchDir, ScratchTransport, etc
 * Remove old doctests or convert to unittests
 * Incidental cleanups

Show diffs side-by-side

added added

removed removed

Lines of Context:
150
150
        tree.revert(['hello.txt'])
151
151
        self.failUnlessExists('hello.txt')
152
152
 
153
 
    def test_unknowns(self):
154
 
        tree = self.make_branch_and_tree('.')
155
 
        self.build_tree(['hello.txt',
156
 
                         'hello.txt.~1~'])
 
153
    def test_unknowns_by_default_patterns(self):
 
154
        """Backup files are ignored by default"""
 
155
        tree = self.make_branch_and_tree('.')
 
156
        self.build_tree(['hello.txt',
 
157
                         'hello.txt.~1~'])
 
158
        self.assertEquals(list(tree.unknowns()),
 
159
                          ['hello.txt'])
 
160
 
 
161
    def test_versioned_files_not_unknown(self):
 
162
        tree = self.make_branch_and_tree('.')
 
163
        self.build_tree(['hello.txt',
 
164
                         'hello.txt.~1~'])
 
165
        tree.add('hello.txt')
 
166
        self.assertEquals(list(tree.unknowns()),
 
167
                          [])
 
168
        tree.remove('hello.txt')
157
169
        self.assertEquals(list(tree.unknowns()),
158
170
                          ['hello.txt'])
159
171