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

  • Committer: Richard Wilbur
  • Date: 2016-02-04 19:07:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6618.
  • Revision ID: richard.wilbur@gmail.com-20160204190728-p0zvfii6zase0fw7
Update COPYING.txt from the original http://www.gnu.org/licenses/gpl-2.0.txt  (Only differences were in whitespace.)  Thanks to Petr Stodulka for pointing out the discrepancy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import threading
20
20
 
21
 
from breezy import (
 
21
from bzrlib import (
22
22
    strace,
23
23
    tests,
24
24
    )
25
 
from breezy.strace import strace_detailed, StraceResult
26
 
from breezy.tests.features import (
 
25
from bzrlib.strace import strace_detailed, StraceResult
 
26
from bzrlib.tests.features import (
27
27
    strace_feature,
28
28
    )
29
29
 
57
57
        """Run strace, but cope if it's not allowed"""
58
58
        try:
59
59
            return strace_detailed(*args, **kwargs)
60
 
        except strace.StraceError as e:
 
60
        except strace.StraceError, e:
61
61
            if e.err_messages.startswith(
62
62
                    "attach: ptrace(PTRACE_ATTACH, ...): Operation not permitted"):
63
63
                raise tests.TestSkipped("ptrace not permitted")
80
80
 
81
81
        def function():
82
82
            return "foo"
83
 
        result, strace_result = self.strace_detailed_or_skip(function, [], {},
 
83
        result, strace_result = self.strace_detailed_or_skip(function,[], {},
84
84
                                                follow_children=False)
85
85
        self.assertEqual("foo", result)
86
86
        self.assertIsInstance(strace_result, StraceResult)