Rev 2568: Fix typo, add comment, following Martin's review. in file:///v/home/vila/src/bugs/102019/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Mon Jul 2 15:09:41 BST 2007
At file:///v/home/vila/src/bugs/102019/
------------------------------------------------------------
revno: 2568
revision-id: v.ladeuil+lp at free.fr-20070702140940-oz36hfh6hcihlgbj
parent: v.ladeuil+lp at free.fr-20070702110710-jjzry7iv7hbqinrm
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 102019
timestamp: Mon 2007-07-02 16:09:40 +0200
message:
Fix typo, add comment, following Martin's review.
modified:
bzrlib/strace.py strace.py-20070323001526-6zquhhw8leb9m6j8-1
bzrlib/tests/test_strace.py test_strace.py-20070323001526-6zquhhw8leb9m6j8-2
-------------- next part --------------
=== modified file 'bzrlib/strace.py'
--- a/bzrlib/strace.py 2007-07-02 11:07:10 +0000
+++ b/bzrlib/strace.py 2007-07-02 14:09:40 +0000
@@ -39,15 +39,17 @@
# thread is running. The following allows the test suite to disable fork
# following to work around the bug. It's a bit dirty to pollute the kwargs
# so we take a likely-to-be-unique name to avoid conflicts (*args and
- # *kwargs are related to 'function').
- follow_childrens = kwargs.pop('strace_follow_childrens', True)
+ # *kwargs are related to 'function'). It's also ugly, but the best
+ # alternative I can think of is to declare another function, which is ugly
+ # too.
+ follow_children = kwargs.pop('strace_follow_children', True)
# capture strace output to a file
log_file = tempfile.NamedTemporaryFile()
log_file_fd = log_file.fileno()
pid = os.getpid()
# start strace
strace_cmd = ['strace', '-r', '-tt', '-p', str(pid), '-o', log_file.name]
- if follow_childrens:
+ if follow_children:
strace_args.append('-f')
proc = subprocess.Popen(strace_cmd,
stdout=subprocess.PIPE,
=== modified file 'bzrlib/tests/test_strace.py'
--- a/bzrlib/tests/test_strace.py 2007-07-02 11:07:10 +0000
+++ b/bzrlib/tests/test_strace.py 2007-07-02 14:09:40 +0000
@@ -52,14 +52,14 @@
def function(positional, *args, **kwargs):
output.append((positional, args, kwargs))
strace(function, "a", "b", c="c",
- strace_follow_childrens=False)
+ strace_follow_children=False)
self.assertEqual([("a", ("b",), {"c":"c"})], output)
def test_strace_callable_result(self):
def function():
return "foo"
result, strace_result = strace(function,
- strace_follow_childrens=False)
+ strace_follow_children=False)
self.assertEqual("foo", result)
self.assertIsInstance(strace_result, StraceResult)
@@ -68,5 +68,5 @@
def function():
self.build_tree(['myfile'])
_, result = strace(function,
- strace_follow_childrens=False)
+ strace_follow_children=False)
self.assertContainsRe(result.raw_log, 'myfile')
More information about the bazaar-commits
mailing list