/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 breezy/tests/test_lsprof.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-22 00:56:52 UTC
  • mfrom: (6621.2.26 py3_pokes)
  • Revision ID: jelmer@jelmer.uk-20170522005652-yjahcr9hwmjkno7n
Merge Python3 porting work ('py3 pokes')

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
"""Tests for profiling data collection."""
18
18
 
19
19
 
20
 
import cPickle
 
20
try:
 
21
    import cPickle as pickle
 
22
except ImportError:
 
23
    import pickle
21
24
import threading
22
25
 
23
26
import breezy
24
 
from breezy import errors, tests
25
 
from breezy.tests import (
 
27
from .. import errors, tests
 
28
from . import (
26
29
    features,
27
30
    )
28
31
 
79
82
    def test_stats_save_to_pickle(self):
80
83
        f = self._tempfile("pkl")
81
84
        self.stats.save(f)
82
 
        data1 = cPickle.load(open(f))
 
85
        data1 = pickle.load(open(f))
83
86
        self.assertEqual(type(data1), breezy.lsprof.Stats)
84
87
 
85
88