tests: use environment variable indirectly
Using environment variable directly in heredoc python code will cause
syntax error at checking module importation by import-checker.py
strictly, because "$varname" is invalid in Python syntax. "$varname"
becomes valid after environment variable substitution by shell at
writing text into file.
Current import-checker.py overlooks code fragment changed in this
patch, because of a restriction below for a line starting code
fragment.
- filename must be specified before limit mark
NG: cat <<EOF > FILE.py
OK: cat > FILE.py <<EOF
import-checker.py itself is fixed in subsequent patch.
--- a/tests/test-pending.t Thu Aug 23 12:20:41 2018 +0900
+++ b/tests/test-pending.t Thu Aug 23 12:24:41 2018 +0900
@@ -50,7 +50,7 @@
> f = open(fpath, 'w')
> f.close()
> # wait for ack - caller should delete the notify file
- > i = $maxwait
+ > i = int("$maxwait")
> while os.path.exists(fpath) and i > 0:
> time.sleep(1)
> i -= 1