[med-svn] [Git][med-team/python-wdlparse][master] Rewrite autopkgtest
Mohd Bilal (@rmb)
gitlab at salsa.debian.org
Mon Aug 29 18:00:11 BST 2022
Mohd Bilal pushed to branch master at Debian Med / python-wdlparse
Commits:
42ce31f8 by Mohammed Bilal at 2022-08-29T22:29:43+05:30
Rewrite autopkgtest
- - - - -
3 changed files:
- debian/tests/control
- debian/tests/run-unit-test
- debian/tests/sample_test.py → debian/tests/test_sample.py
Changes:
=====================================
debian/tests/control
=====================================
@@ -1,3 +1,3 @@
Tests: run-unit-test
-Depends: @, python3-all
+Depends: @, python3-all, python3-pytest
Restrictions: allow-stderr
=====================================
debian/tests/run-unit-test
=====================================
@@ -10,7 +10,7 @@ if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
fi
-cp -a ${CUR_DIR}/debian/tests/sample_test.py "${AUTOPKGTEST_TMP}"
+cp -a ${CUR_DIR}/debian/tests/test_sample.py "${AUTOPKGTEST_TMP}"
cd "${AUTOPKGTEST_TMP}"
@@ -19,7 +19,7 @@ echo -e "Running Tests"
for py in $(py3versions -s 2> /dev/null)
do
echo "Testing with $py in $(pwd):"
- $py sample_test.py
+ $py -m pytest
done
=====================================
debian/tests/sample_test.py → debian/tests/test_sample.py
=====================================
@@ -15,8 +15,12 @@ workflow my_wf {
call my_task
}
"""
-# Parse source code into abstract syntax tree
-ast = wdl_parser.parse(wdl_code).ast()
-# Print out abstract syntax tree
-print(ast.dumps(indent=2))
+def test_basic_Ast():
+ ast = wdl_parser.parse(wdl_code).ast()
+ cmpnd=wdl_parser.parse(wdl_code).is_compound_nud()
+ check=isinstance(ast,wdl_parser.Ast)
+
+ assert ast.name == "Namespace"
+ assert cmpnd == False
+ assert check == True
View it on GitLab: https://salsa.debian.org/med-team/python-wdlparse/-/commit/42ce31f8e0719efc09e9102baa4c1f525dba5f1a
--
View it on GitLab: https://salsa.debian.org/med-team/python-wdlparse/-/commit/42ce31f8e0719efc09e9102baa4c1f525dba5f1a
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20220829/e306cba2/attachment-0001.htm>
More information about the debian-med-commit
mailing list