~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_ancestry.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-08-20 06:10:34 UTC
  • mfrom: (2664.9.1 doc-last-modified)
  • Revision ID: pqm@pqm.ubuntu.com-20070820061034-4y2ywj61q0on3mcj
(mbp,jameinel) notes on directory last-modified

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
import os
18
18
 
19
19
from bzrlib.tests import TestCaseWithTransport
 
20
from bzrlib.workingtree import WorkingTree
 
21
from bzrlib.branch import Branch
 
22
 
20
23
 
21
24
class TestAncestry(TestCaseWithTransport):
22
25
 
40
43
 
41
44
    def _check_ancestry(self, location='', result=None):
42
45
        out = self.run_bzr(['ancestry', location])[0]
43
 
        if result is not None:
44
 
            self.assertEqualDiff(result, out)
45
 
        else:
46
 
            # A2 and B1 can be in either order, because they are parallel, and
47
 
            # thus their topological order is not defined
 
46
        if result is None:
48
47
            result = "A1\nB1\nA2\nA3\n"
49
 
            if result != out:
50
 
                result = "A1\nA2\nB1\nA3\n"
51
 
            self.assertEqualDiff(result, out)
 
48
        self.assertEqualDiff(out, result)
52
49
 
53
50
    def test_ancestry(self):
54
51
        """Tests 'ancestry' command"""