/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/benchmarks/bench_knit.py

  • Committer: Vincent Ladeuil
  • Date: 2010-01-25 17:48:22 UTC
  • mto: (4987.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4988.
  • Revision ID: v.ladeuil+lp@free.fr-20100125174822-nce4l19sbwx83jvq
Deploying the new overrideAttr facility further reduces the complexity
and make the code clearer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
 
62
62
    def setup_load_data_c(self):
63
63
        self.requireFeature(CompiledKnitFeature)
64
 
        self.addAttrCleanup(knit, '_load_data')
65
64
        from bzrlib._knit_load_data_pyx import _load_data_c
66
 
        knit._load_data = _load_data_c
 
65
        self.overrideAttr(knit, '_load_data', _load_data_c)
67
66
 
68
67
    def setup_load_data_py(self):
69
 
        self.addAttrCleanup(knit, '_load_data')
70
68
        from bzrlib._knit_load_data_py import _load_data_py
71
 
        knit._load_data = _load_data_py
 
69
        self.overrideAttr(knit, '_load_data', _load_data_py)
72
70
 
73
71
    def test_read_50k_index_c(self):
74
72
        self.setup_load_data_c()