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

  • Committer: Jelmer Vernooij
  • Date: 2018-07-08 10:56:06 UTC
  • mto: This revision was merged to the branch mainline in revision 7030.
  • Revision ID: jelmer@jelmer.uk-20180708105606-d53hkks89qq88twu
Use separate .as_bytes method rather than __bytes__.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
from bzrlib import tests
18
 
from bzrlib.tests import test_lsprof
 
17
from breezy import tests
 
18
from breezy.tests import features
19
19
 
20
20
 
21
21
class TestLSProf(tests.TestCaseInTempDir):
22
22
 
23
 
    _test_needs_features = [test_lsprof.LSProfFeature]
 
23
    _test_needs_features = [features.lsprof_feature]
24
24
 
25
25
    def test_file(self):
26
26
        out, err = self.run_bzr('--lsprof-file output.callgrind rocks')
27
 
        self.assertNotContainsRe(out, 'Profile data written to')
28
 
        self.assertContainsRe(err, 'Profile data written to')
 
27
        self.assertNotContainsRe(out, b'Profile data written to')
 
28
        self.assertContainsRe(err, b'Profile data written to')
29
29
 
30
30
    def test_stdout(self):
31
31
        out, err = self.run_bzr('--lsprof rocks')
32
 
        self.assertContainsRe(out, 'CallCount')
33
 
        self.assertNotContainsRe(err, 'Profile data written to')
 
32
        self.assertContainsRe(out, b'CallCount')
 
33
        self.assertNotContainsRe(err, b'Profile data written to')