Patchwork [V2] py3: test to check which commands run

login
register
mail settings
Submitter Pulkit Goyal
Date Oct. 9, 2016, 4:35 p.m.
Message ID <b2b8c1575415ec60a658.1476030957@pulkit-goyal>
Download mbox | patch
Permalink /patch/17017/
State Accepted
Headers show

Comments

Pulkit Goyal - Oct. 9, 2016, 4:35 p.m.
# HG changeset patch
# User Pulkit Goyal <7895pulkit@gmail.com>
# Date 1476014360 -7200
#      Sun Oct 09 13:59:20 2016 +0200
# Node ID b2b8c1575415ec60a65833f17730c7f77dbe9f60
# Parent  3ce847adae982625abac548017e43da189eb5e71
py3: test to check which commands run

This test helps us to keep track on the commands which runs to Python 3.
The full traceback is hidden. Thanks to Augie and Martijn to wrap it up
in four lines.
Yuya Nishihara - Oct. 10, 2016, 5:42 a.m.
On Sun, 09 Oct 2016 18:35:57 +0200, Pulkit Goyal wrote:
> # HG changeset patch
> # User Pulkit Goyal <7895pulkit@gmail.com>
> # Date 1476014360 -7200
> #      Sun Oct 09 13:59:20 2016 +0200
> # Node ID b2b8c1575415ec60a65833f17730c7f77dbe9f60
> # Parent  3ce847adae982625abac548017e43da189eb5e71
> py3: test to check which commands run

Looks good. Queued, thanks.
Yuya Nishihara - Oct. 10, 2016, 6:17 a.m.
On Sun, 09 Oct 2016 18:35:57 +0200, Pulkit Goyal wrote:
> # HG changeset patch
> # User Pulkit Goyal <7895pulkit@gmail.com>
> # Date 1476014360 -7200
> #      Sun Oct 09 13:59:20 2016 +0200
> # Node ID b2b8c1575415ec60a65833f17730c7f77dbe9f60
> # Parent  3ce847adae982625abac548017e43da189eb5e71
> py3: test to check which commands run
> 
> This test helps us to keep track on the commands which runs to Python 3.
> The full traceback is hidden. Thanks to Augie and Martijn to wrap it up
> in four lines.
> 
> diff -r 3ce847adae98 -r b2b8c1575415 tests/test-check-py3-commands.t
> --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
> +++ b/tests/test-check-py3-commands.t	Sun Oct 09 13:59:20 2016 +0200
> @@ -0,0 +1,14 @@
> +#require py3exe
> +
> +This test helps in keeping a track on which commands we can run on
> +Python 3 and see what kind of errors are coming up.
> +The full traceback is hidden to have a stable output.
> +
> +  $ for cmd in version debuginstall ; do
> +  >   echo $cmd
> +  >   $PYTHON3 `which hg` $cmd 2>&1 2>&1 | tail -n 1

Fixed as s/-n 1/-1/ for compatibility.

+  tests/test-check-py3-commands.t:9:
+   >   >   $PYTHON3 `which hg` $cmd 2>&1 2>&1 | tail -n 1
+   don't use the '-n' option to tail, just use '-<num>'

Patch

diff -r 3ce847adae98 -r b2b8c1575415 tests/test-check-py3-commands.t
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-check-py3-commands.t	Sun Oct 09 13:59:20 2016 +0200
@@ -0,0 +1,14 @@ 
+#require py3exe
+
+This test helps in keeping a track on which commands we can run on
+Python 3 and see what kind of errors are coming up.
+The full traceback is hidden to have a stable output.
+
+  $ for cmd in version debuginstall ; do
+  >   echo $cmd
+  >   $PYTHON3 `which hg` $cmd 2>&1 2>&1 | tail -n 1
+  > done
+  version
+  TypeError: str expected, not bytes
+  debuginstall
+  TypeError: str expected, not bytes