Running a file other than the main file for Unit Testing
LeonGrin (26)

I created a file to unit test the file. But every time I click "Run", it only runs the file. Is it possible to run a file other than the main file?

You are viewing a single comment. View All
fandressouza (4)

In case someone is looking to simply run a file use:
import os
os.system('python3 <filename>.py')
m201713 (0)

how did you do that?
if i click the run icon, it show me like this

sh: 1: cannot open Ex01: No such file

fandressouza (4)

@m201713 make sure you remove "<>", if your file is called you must write the following:
import os
KarthikGunaseka (0)

@fandressouza Thank you.... This solved my requirement...