yes, it is possible to "test" python code with SASUnit.
You can start the call to python as your test call in SASUnit.
I'm not sure what portion of the python log / output will be visible in the SAS log file.
That surely depends on the way you call the python program.
You can then check the results (e.g. report or data set) with SASUnit.
%initScenario(i_desc=Testsforpythonprogramxyz);%initTestcase(i_object=call_python_program_xyz.sas,i_desc=CallwithParametersabc)<...callpythonprogramxyz...>%endTestCall()/* Do all the testing that's appropriate */%assertLog(i_errors=0,i_warnings=0)<...moreTests...>%endTestCase()%endScenario();
As far as i know PROC PYTHON is only available in SAS Viya. Please keep in mind that the batch processing of SASUnit is not yet compatible with SAS Viya.
You can use filename pipe to run your python programs is SAS9.4
Regards
Klaus
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Do you think it would be possible to test python code with SASUnit (e.g using proc python), or would I need a separate testing tool for that?
Br
Henrik
Hi Henrik,
yes, it is possible to "test" python code with SASUnit.
You can start the call to python as your test call in SASUnit.
I'm not sure what portion of the python log / output will be visible in the SAS log file.
That surely depends on the way you call the python program.
You can then check the results (e.g. report or data set) with SASUnit.
As far as i know PROC PYTHON is only available in SAS Viya. Please keep in mind that the batch processing of SASUnit is not yet compatible with SAS Viya.
You can use filename pipe to run your python programs is SAS9.4
Regards
Klaus