tests: test compiling with python3 if given as shebang interpreter

Currently plugins fail to compile if they use Python 3 syntax features,
even though they use a correct shebang.
This commit is contained in:
Lars Kruse 2015-10-30 06:09:12 +01:00
parent 67b0241e90
commit d1a8965b5a
1 changed files with 8 additions and 0 deletions

View File

@ -94,6 +94,14 @@ sub process_file {
}
);
}
elsif ( $interpreter =~ m{python3} ) {
run_check(
{ command => [ 'python3', '-m', 'py_compile', $file ],
description => 'python3 compile',
filename => $filename
}
);
}
elsif ( $interpreter =~ m{python} ) {
run_check(
{ command => [ 'python', '-m', 'py_compile', $file ],