From 7ab437399276327ddb0babd8375177d98828c28b Mon Sep 17 00:00:00 2001 From: Pyroseza Date: Thu, 21 Jan 2021 22:05:28 +0000 Subject: [PATCH] Convert paradoc test to bash script Now loads the paradoc correctly and gets paradoc to print the result --- lxc/tests/test_paradoc.py | 5 ----- lxc/tests/test_paradoc.sh | 11 +++++++++++ 2 files changed, 11 insertions(+), 5 deletions(-) delete mode 100644 lxc/tests/test_paradoc.py create mode 100644 lxc/tests/test_paradoc.sh diff --git a/lxc/tests/test_paradoc.py b/lxc/tests/test_paradoc.py deleted file mode 100644 index 3acba15..0000000 --- a/lxc/tests/test_paradoc.py +++ /dev/null @@ -1,5 +0,0 @@ -try: - import paradoc - print('good') -except: - pass diff --git a/lxc/tests/test_paradoc.sh b/lxc/tests/test_paradoc.sh new file mode 100644 index 0000000..5f70e1c --- /dev/null +++ b/lxc/tests/test_paradoc.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# add paradoc module to python python +export PYTHONPATH=$PYTHONPATH:/opt/paradoc +# file for test code +test_code=/tmp/paradoc.test +# save test code to file +echo -n iP>$test_code +# pass param to paradoc module and have it print it +echo good | python3.8 -m paradoc $test_code +# clean test code +rm -f $test_code