Skip to content

Commit

Permalink
set PUDB_TTY during test, to aid debugging
Browse files Browse the repository at this point in the history
maybe you don't want this, but it's nice for me and won't harm anything
  • Loading branch information
bukzor committed May 11, 2022
1 parent b0a1733 commit 2531325
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ err_report() {

trap 'err_report' ERR

if tty --quiet; then
# enable debugging with [PuDB](https://youtu.be/bJYkCWPs_UU)
export PUDB_TTY
PUDB_TTY="$(tty)"
fi

PYTHON_VERSION2="$(python3 -c 'if True:
import sys
major, minor = sys.version_info[:2]
Expand All @@ -27,7 +33,7 @@ fi

cat "test/${PYTHON_VERSION}_unformatted.py" | python3 cblack.py -q - > test/${PYTHON_VERSION}_reformatted.py

diff -u --color=auto test/${PYTHON_VERSION}_expected.py test/${PYTHON_VERSION}_reformatted.py
diff -u --color=always test/${PYTHON_VERSION}_expected.py test/${PYTHON_VERSION}_reformatted.py

echo "Test ${PYTHON_VERSION} Succeeded!"
exit 0

0 comments on commit 2531325

Please sign in to comment.