~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to tests/is_clean.py

  • Committer: Robert Collins
  • Date: 2005-09-28 05:43:19 UTC
  • mto: (147.2.6) (364.1.3 bzrtools)
  • mto: This revision was merged to the branch mainline in revision 324.
  • Revision ID: robertc@robertcollins.net-20050928054319-2c2e9e3048bbc215
find_branch -> open_containing change

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
import os.path
2
 
 
3
 
from bzrlib import add, tests
4
 
from bzrlib.plugins.bzrtools.bzrtools import is_clean
5
 
 
6
 
class TestIsClean(tests.TestCaseWithTransport):
7
 
 
8
 
    def test_is_clean(self):
9
 
        tree = self.make_branch_and_tree('.')
10
 
        self.assertEqual((True, []), is_clean(tree))
11
 
        fooname = os.path.join(tree.basedir, "foo")
12
 
        file(fooname, "wb").write("bar")
13
 
        self.assertEqual((True, [u'foo']), is_clean(tree))
14
 
        add.smart_add_tree(tree, [tree.basedir])
15
 
        self.assertEqual((False, []), is_clean(tree))
16
 
        tree.commit("added file", rev_id='commit-id')
17
 
        self.assertEqual((True, []), is_clean(tree))