[PATCH V2] hook: filter out unstable output in tests
Siddharth Agarwal
sid0 at fb.com
Thu Mar 10 18:13:46 UTC 2016
# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1457633543 28800
# Thu Mar 10 10:12:23 2016 -0800
# Node ID bc4649e9bc48855a464414ee993fac96847c76b6
# Parent 1c658391b22fb4d98ccfb60c0e57315b55634117
# Available At http://42.netv6.net/sid0-wip/hg/
# hg pull http://42.netv6.net/sid0-wip/hg/ -r bc4649e9bc48
hook: filter out unstable output in tests
This output is different between Python 2.6 and Python 2.7. It's also pretty
irrelevant, so just filter it out.
diff --git a/tests/test-hook.t b/tests/test-hook.t
--- a/tests/test-hook.t
+++ b/tests/test-hook.t
@@ -530,13 +530,13 @@ test python hooks
(run with --traceback for stack trace)
[255]
- $ hg pull ../a --traceback 2>&1 | egrep -v '^( +File| [_a-zA-Z*(])'
+The second egrep is to filter out lines like ' ^', which are slightly
+different between Python 2.6 and Python 2.7.
+ $ hg pull ../a --traceback 2>&1 | egrep -v '^( +File| [_a-zA-Z*(])' | egrep -v '^( )+(\^)?$'
pulling from ../a
searching for changes
exception from first failed import attempt:
Traceback (most recent call last):
-
- ^
SyntaxError: invalid syntax
exception from second failed import attempt:
Traceback (most recent call last):
More information about the Mercurial-devel
mailing list