comparison tests/test-run-tests.t @ 35393:4441705b7111

tests: remove (glob) annotations that were only for '\' matches # skip-blame because this was mechanically rewritten the following script. I ran it on both *.t and *.py, but none of the *.py changes were proper. All *.t ones appear to be, and they run without addition failures on both Windows and Linux. import argparse import os import re ap = argparse.ArgumentParser() ap.add_argument('path', nargs='+') opts = ap.parse_args() globre = re.compile(r'^(.*) \(glob\)(.*)$') for p in opts.path: tmp = p + '.tmp' with open(p, 'rb') as src, open(tmp, 'wb') as dst: for line in src: m = globre.match(line) if not m or '$LOCALIP' in line or '*' in line: dst.write(line) continue if '?' in line[:-3] or ('?' in line[:-3] and line[-3:] != '(?)'): dst.write(line) continue dst.write(m.group(1) + m.group(2) + '\n') os.unlink(p) os.rename(tmp, p)
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 10 Dec 2017 22:50:57 -0500
parents 0432e54f4dbe
children 417fa23017f9
comparison
equal deleted inserted replaced
35392:5feb782c7a95 35393:4441705b7111
678 pad pad pad pad............................................................ 678 pad pad pad pad............................................................
679 679
680 Interactive with custom view 680 Interactive with custom view
681 681
682 $ echo 'n' | rt -i --view echo 682 $ echo 'n' | rt -i --view echo
683 $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err (glob) 683 $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err
684 Accept this change? [n]* (glob) 684 Accept this change? [n]* (glob)
685 ERROR: test-failure.t output changed 685 ERROR: test-failure.t output changed
686 !. 686 !.
687 Failed test-failure.t: output changed 687 Failed test-failure.t: output changed
688 # Ran 2 tests, 0 skipped, 1 failed. 688 # Ran 2 tests, 0 skipped, 1 failed.
690 [1] 690 [1]
691 691
692 View the fix 692 View the fix
693 693
694 $ echo 'y' | rt --view echo 694 $ echo 'y' | rt --view echo
695 $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err (glob) 695 $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err
696 696
697 ERROR: test-failure.t output changed 697 ERROR: test-failure.t output changed
698 !. 698 !.
699 Failed test-failure.t: output changed 699 Failed test-failure.t: output changed
700 # Ran 2 tests, 0 skipped, 1 failed. 700 # Ran 2 tests, 0 skipped, 1 failed.
856 [1] 856 [1]
857 857
858 test --tmpdir support 858 test --tmpdir support
859 $ rt --tmpdir=$TESTTMP/keep test-success.t 859 $ rt --tmpdir=$TESTTMP/keep test-success.t
860 860
861 Keeping testtmp dir: $TESTTMP/keep/child1/test-success.t (glob) 861 Keeping testtmp dir: $TESTTMP/keep/child1/test-success.t
862 Keeping threadtmp dir: $TESTTMP/keep/child1 (glob) 862 Keeping threadtmp dir: $TESTTMP/keep/child1
863 . 863 .
864 # Ran 1 tests, 0 skipped, 0 failed. 864 # Ran 1 tests, 0 skipped, 0 failed.
865 865
866 timeouts 866 timeouts
867 ======== 867 ========