~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to tests/blackbox.py

  • Committer: Aaron Bentley
  • Date: 2007-12-27 16:30:52 UTC
  • Revision ID: abentley@panoramicfeedback.com-20071227163052-l4wmn2vsl91nbfjh
Remove test due to intentional behavior change

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
from bzrlib.tests.blackbox import ExternalBase
 
1
import os
 
2
import os.path
2
3
from unittest import makeSuite
3
 
import os.path
4
 
class TestBzrTools(ExternalBase):
 
4
 
 
5
from bzrlib import branch
 
6
from bzrlib.tests import TestCaseWithTransport
 
7
 
 
8
 
 
9
class TestBzrTools(TestCaseWithTransport):
5
10
    @staticmethod
6
11
    def touch(filename):
7
12
        file(filename, 'wb').write('')
91
96
        self.assertIs(False, os.path.exists('checkout'))
92
97
        self.assertIs(True, os.path.exists('source'))
93
98
 
 
99
    def test_zap_modified(self):
 
100
        tree = self.make_branch_and_tree('source')
 
101
        checkout = tree.branch.create_checkout('checkout', lightweight=True)
 
102
        self.build_tree(['checkout/file'])
 
103
        checkout.add('file')
 
104
        self.run_bzr_error(('This checkout has uncommitted changes',),
 
105
                           'zap checkout')
 
106
        self.failUnlessExists('checkout')
 
107
        self.run_bzr('zap checkout --force')
 
108
        self.failIfExists('checkout')
 
109
        self.failUnlessExists('source')
 
110
 
94
111
    def test_zap_branch(self):
95
112
        self.run_bzr('init source')
96
113
        self.run_bzr('checkout --lightweight source checkout')
115
132
        self.assertIs(True, 'source/subsource' in lines)
116
133
        self.assertIs(True, 'checkout/subcheckout' in lines)
117
134
        self.assertIs(True, 'checkout' not in lines)
118
 
        self.assertIs(True, 'checkout/.bzr/subcheckout' not in lines)
119
135
 
120
136
    def test_import_upstream(self):
121
137
        self.run_bzr('init source')