~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_graph.py

  • Committer: John Arbash Meinel
  • Date: 2011-01-11 18:10:55 UTC
  • mto: This revision was merged to the branch mainline in revision 5596.
  • Revision ID: john@arbash-meinel.com-20110111181055-d79p02kioxcg4f7l
Change tuned_gzip.GzipFile to be deprecated

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007-2011 Canonical Ltd
 
1
# Copyright (C) 2007-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
699
699
        self.assertEqual({'rev2': ['rev1']},
700
700
                         stacked.get_parent_map(['rev2']))
701
701
 
 
702
    def test__stacked_parents_provider_deprecated(self):
 
703
        parents1 = _mod_graph.DictParentsProvider({'rev2': ['rev3']})
 
704
        parents2 = _mod_graph.DictParentsProvider({'rev1': ['rev4']})
 
705
        stacked = self.applyDeprecated(deprecated_in((1, 16, 0)),
 
706
                    _mod_graph._StackedParentsProvider, [parents1, parents2])
 
707
        self.assertEqual({'rev1':['rev4'], 'rev2':['rev3']},
 
708
                         stacked.get_parent_map(['rev1', 'rev2']))
 
709
        self.assertEqual({'rev2':['rev3'], 'rev1':['rev4']},
 
710
                         stacked.get_parent_map(['rev2', 'rev1']))
 
711
        self.assertEqual({'rev2':['rev3']},
 
712
                         stacked.get_parent_map(['rev2', 'rev2']))
 
713
        self.assertEqual({'rev1':['rev4']},
 
714
                         stacked.get_parent_map(['rev1', 'rev1']))
 
715
 
702
716
    def test_iter_topo_order(self):
703
717
        graph = self.make_graph(ancestry_1)
704
718
        args = ['rev2a', 'rev3', 'rev1']