changeset 5613:87966baf6ea9

tests: use appropriate Python (2 or 3) for json.tool
author Anton Shestakov <av6@dwimlabs.net>
date Sun, 25 Oct 2020 21:38:37 +0800
parents 6576f6bb644b
children eb326644dc29
files tests/test-evolve-cycles.t tests/test-evolve-obshistory-amend-then-fold.t tests/test-evolve-obshistory-amend.t tests/test-evolve-obshistory-content-divergent.t tests/test-evolve-obshistory-fold.t tests/test-evolve-obshistory-lots-of-splits.t tests/test-evolve-obshistory-phase-divergent.t tests/test-evolve-obshistory-prune.t tests/test-evolve-obshistory-split.t tests/test-topic-stack.t
diffstat 10 files changed, 25 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-evolve-cycles.t	Sat Oct 24 23:55:15 2020 +0800
+++ b/tests/test-evolve-cycles.t	Sun Oct 25 21:38:37 2020 +0800
@@ -358,7 +358,7 @@
 
 Check the json output is valid in this case
 
-  $ hg obslog "desc(D)" --hidden --no-graph -Tjson | python -m json.tool
+  $ hg obslog "desc(D)" --hidden --no-graph -Tjson | "$PYTHON" -m json.tool
   [
       {
           "markers": [
@@ -559,7 +559,7 @@
       }
   ]
 
-  $ hg obslog "desc(D)" --hidden --no-graph --no-origin -Tjson | python -m json.tool
+  $ hg obslog "desc(D)" --hidden --no-graph --no-origin -Tjson | "$PYTHON" -m json.tool
   [
       {
           "markers": [
--- a/tests/test-evolve-obshistory-amend-then-fold.t	Sat Oct 24 23:55:15 2020 +0800
+++ b/tests/test-evolve-obshistory-amend-then-fold.t	Sun Oct 25 21:38:37 2020 +0800
@@ -185,7 +185,7 @@
   |
   x  0dec01379d3b (2) B0
   
-  $ hg obslog eb5a0daa2192 --no-graph --no-origin -Tjson | python -m json.tool
+  $ hg obslog eb5a0daa2192 --no-graph --no-origin -Tjson | "$PYTHON" -m json.tool
   [
       {
           "markers": [],
@@ -277,7 +277,7 @@
           "shortdescription": "A0"
       }
   ]
-  $ hg obslog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
+  $ hg obslog eb5a0daa2192 --no-graph -Tjson | "$PYTHON" -m json.tool
   [
       {
           "markers": [
--- a/tests/test-evolve-obshistory-amend.t	Sat Oct 24 23:55:15 2020 +0800
+++ b/tests/test-evolve-obshistory-amend.t	Sun Oct 25 21:38:37 2020 +0800
@@ -155,7 +155,7 @@
   |
   x  A0
   
-  $ hg obslog 4ae3a4151de9 --no-graph -Tjson | python -m json.tool
+  $ hg obslog 4ae3a4151de9 --no-graph -Tjson | "$PYTHON" -m json.tool
   [
       {
           "markers": [
@@ -194,7 +194,7 @@
   $ hg obslog --hidden --patch 471f378eab4c
   x  471f378eab4c (1) A0
   
-  $ hg obslog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool
+  $ hg obslog --hidden 471f378eab4c --no-graph -Tjson | "$PYTHON" -m json.tool
   [
       {
           "markers": [],
--- a/tests/test-evolve-obshistory-content-divergent.t	Sat Oct 24 23:55:15 2020 +0800
+++ b/tests/test-evolve-obshistory-content-divergent.t	Sun Oct 25 21:38:37 2020 +0800
@@ -137,7 +137,7 @@
        reworded(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
        reworded(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
   
-  $ hg obslog --hidden 471f378eab4c --no-graph --no-origin -Tjson | python -m json.tool
+  $ hg obslog --hidden 471f378eab4c --no-graph --no-origin -Tjson | "$PYTHON" -m json.tool
   [
       {
           "markers": [
@@ -188,7 +188,7 @@
           "shortdescription": "A0"
       }
   ]
-  $ hg obslog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool
+  $ hg obslog --hidden 471f378eab4c --no-graph -Tjson | "$PYTHON" -m json.tool
   [
       {
           "markers": [],
@@ -315,7 +315,7 @@
   |
   x  471f378eab4c (1) A0
   
-  $ hg obslog '65b757b745b9+fdf9bde5129a' --no-graph --no-origin -Tjson | python -m json.tool
+  $ hg obslog '65b757b745b9+fdf9bde5129a' --no-graph --no-origin -Tjson | "$PYTHON" -m json.tool
   [
       {
           "markers": [],
@@ -376,7 +376,7 @@
           "shortdescription": "A1"
       }
   ]
-  $ hg obslog '65b757b745b9+fdf9bde5129a' --no-graph -Tjson | python -m json.tool
+  $ hg obslog '65b757b745b9+fdf9bde5129a' --no-graph -Tjson | "$PYTHON" -m json.tool
   [
       {
           "markers": [
--- a/tests/test-evolve-obshistory-fold.t	Sat Oct 24 23:55:15 2020 +0800
+++ b/tests/test-evolve-obshistory-fold.t	Sun Oct 25 21:38:37 2020 +0800
@@ -166,7 +166,7 @@
          +B0
   
   
-  $ hg obslog eb5a0daa2192 --no-graph --no-origin -Tjson | python -m json.tool
+  $ hg obslog eb5a0daa2192 --no-graph --no-origin -Tjson | "$PYTHON" -m json.tool
   [
       {
           "markers": [],
@@ -241,7 +241,7 @@
    /
   x  471f378eab4c (1) A0
   
-  $ hg obslog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
+  $ hg obslog eb5a0daa2192 --no-graph -Tjson | "$PYTHON" -m json.tool
   [
       {
           "markers": [
--- a/tests/test-evolve-obshistory-lots-of-splits.t	Sat Oct 24 23:55:15 2020 +0800
+++ b/tests/test-evolve-obshistory-lots-of-splits.t	Sun Oct 25 21:38:37 2020 +0800
@@ -225,7 +225,7 @@
   |
   x  de7290d8b885 (1) A0
   
-  $ hg obslog de7290d8b885 --hidden --no-graph --no-origin -Tjson | python -m json.tool
+  $ hg obslog de7290d8b885 --hidden --no-graph --no-origin -Tjson | "$PYTHON" -m json.tool
   [
       {
           "markers": [
@@ -273,7 +273,7 @@
   |
   x  de7290d8b885 (1) A0
   
-  $ hg obslog c7f044602e9b --no-graph --no-origin -Tjson | python -m json.tool
+  $ hg obslog c7f044602e9b --no-graph --no-origin -Tjson | "$PYTHON" -m json.tool
   [
       {
           "markers": [],
@@ -312,7 +312,7 @@
           "shortdescription": "A0"
       }
   ]
-  $ hg obslog c7f044602e9b --no-graph -Tjson | python -m json.tool
+  $ hg obslog c7f044602e9b --no-graph -Tjson | "$PYTHON" -m json.tool
   [
       {
           "markers": [
--- a/tests/test-evolve-obshistory-phase-divergent.t	Sat Oct 24 23:55:15 2020 +0800
+++ b/tests/test-evolve-obshistory-phase-divergent.t	Sun Oct 25 21:38:37 2020 +0800
@@ -105,7 +105,7 @@
   |
   @  471f378eab4c (1) A0
   
-  $ hg obslog --hidden 471f378eab4c --no-graph --no-origin -Tjson | python -m json.tool
+  $ hg obslog --hidden 471f378eab4c --no-graph --no-origin -Tjson | "$PYTHON" -m json.tool
   [
       {
           "markers": [
@@ -135,7 +135,7 @@
           "shortdescription": "A0"
       }
   ]
-  $ hg obslog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool
+  $ hg obslog --hidden 471f378eab4c --no-graph -Tjson | "$PYTHON" -m json.tool
   [
       {
           "markers": [],
@@ -186,7 +186,7 @@
   |
   @  471f378eab4c (1) A0
   
-  $ hg obslog 'fdf9bde5129a+471f378eab4c' --no-graph --no-origin -Tjson | python -m json.tool
+  $ hg obslog 'fdf9bde5129a+471f378eab4c' --no-graph --no-origin -Tjson | "$PYTHON" -m json.tool
   [
       {
           "markers": [],
@@ -221,7 +221,7 @@
           "shortdescription": "A0"
       }
   ]
-  $ hg obslog 'fdf9bde5129a+471f378eab4c' --no-graph -Tjson | python -m json.tool
+  $ hg obslog 'fdf9bde5129a+471f378eab4c' --no-graph -Tjson | "$PYTHON" -m json.tool
   [
       {
           "markers": [
--- a/tests/test-evolve-obshistory-prune.t	Sat Oct 24 23:55:15 2020 +0800
+++ b/tests/test-evolve-obshistory-prune.t	Sun Oct 25 21:38:37 2020 +0800
@@ -67,7 +67,7 @@
        pruned using prune by test (Thu Jan 01 00:00:00 1970 +0000)
          (No patch available, no predecessors)
   
-  $ hg obslog 'desc(B0)' --hidden --no-graph -Tjson | python -m json.tool
+  $ hg obslog 'desc(B0)' --hidden --no-graph -Tjson | "$PYTHON" -m json.tool
   [
       {
           "markers": [
@@ -94,7 +94,7 @@
   $ hg obslog 'desc(A0)' --patch
   @  471f378eab4c (1) A0
   
-  $ hg obslog 'desc(A0)' --no-graph -Tjson | python -m json.tool
+  $ hg obslog 'desc(A0)' --no-graph -Tjson | "$PYTHON" -m json.tool
   [
       {
           "markers": [],
--- a/tests/test-evolve-obshistory-split.t	Sat Oct 24 23:55:15 2020 +0800
+++ b/tests/test-evolve-obshistory-split.t	Sun Oct 25 21:38:37 2020 +0800
@@ -109,7 +109,7 @@
          note: testing split
          (No patch available, too many successors (2))
   
-  $ hg obslog 471597cad322 --hidden --no-graph --no-origin -Tjson | python -m json.tool
+  $ hg obslog 471597cad322 --hidden --no-graph --no-origin -Tjson | "$PYTHON" -m json.tool
   [
       {
           "markers": [
@@ -144,7 +144,7 @@
           "shortdescription": "A0"
       }
   ]
-  $ hg obslog 471597cad322 --hidden --no-graph -Tjson | python -m json.tool
+  $ hg obslog 471597cad322 --hidden --no-graph -Tjson | "$PYTHON" -m json.tool
   [
       {
           "markers": [],
--- a/tests/test-topic-stack.t	Sat Oct 24 23:55:15 2020 +0800
+++ b/tests/test-topic-stack.t	Sun Oct 25 21:38:37 2020 +0800
@@ -104,7 +104,7 @@
   s2(e629654d7050): c_d
   s1(8522f9e3fee9): c_c
   s0(ea705abc4f51)^ c_b (base)
-  $ hg stack -Tjson | python -m json.tool
+  $ hg stack -Tjson | "$PYTHON" -m json.tool
   [
       {
           "desc": "c_f",
@@ -157,7 +157,7 @@
           "symbol": "^"
       }
   ]
-  $ hg stack -v -Tjson | python -m json.tool
+  $ hg stack -v -Tjson | "$PYTHON" -m json.tool
   [
       {
           "desc": "c_f",