Skip to content

Commit 405e8d0

Browse files
committed
Sync PyGradle
1 parent 7e3b5ec commit 405e8d0

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

gradle/python.gradle

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -266,29 +266,25 @@ task uninstall(type: Task) {
266266

267267
/***** Verification Group */
268268

269-
/* Run all python unittests from sourceRoot */
269+
/* Run all python tests from testRoot */
270270
task check(type: Task) {
271271
group = 'Verification'
272-
description = "Run all python unittests from sourceRoot"
272+
description = "Run all python tests from testRoot"
273273
dependsOn compilePython
274274
dependsOn compileQrc
275275
doLast {
276276
println "Executing all unittests from ${sourceRoot}"
277-
fileTree("${sourceRoot}/test").matching {
278-
include "**/test_*.py"
279-
}.each { File file ->
280-
if (verbose) {
281-
println ""
282-
println " PYTHON_PATHS: "
283-
println "\t|- ${project.ext.pythonPath.split(':').join('\n\t|- ')}"
284-
println "Executing unittests from -> ${file.name}"
285-
println ""
286-
}
287-
exec {
288-
workingDir = dirName(file)
289-
environment PYTHONPATH: pythonPath
290-
commandLine project.python, '-m', 'unittest', '-b', '-f', '-v' ,file.path
291-
}
277+
if (verbose) {
278+
println ""
279+
println " PYTHON_PATHS: "
280+
println "\t|- ${project.ext.pythonPath.split(':').join('\n\t|- ')}"
281+
println "Executing unittests from -> ${file.name}"
282+
println ""
283+
}
284+
exec {
285+
workingDir = "${sourceRoot}/test"
286+
environment PYTHONPATH: pythonPath
287+
commandLine project.python, '-m', 'pytest', '--no-header', '-vv'
292288
}
293289
}
294290
}

0 commit comments

Comments
 (0)