[med-svn] [Git][med-team/python-wdlparse][master] Rewrite autopkgtest
Mohd Bilal (@rmb)
gitlab at salsa.debian.org
Mon Aug 29 17:49:46 BST 2022
Mohd Bilal pushed to branch master at Debian Med / python-wdlparse
Commits:
7a2e95d7 by Mohammed Bilal at 2022-08-29T16:49:20+00:00
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
=====================================
@@ -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/7a2e95d71dd786afcac714cf31c6058081666da9
--
View it on GitLab: https://salsa.debian.org/med-team/python-wdlparse/-/commit/7a2e95d71dd786afcac714cf31c6058081666da9
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/d57bdb43/attachment-0001.htm>
More information about the debian-med-commit
mailing list