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
Aersum (4)

I solved this problem like this:
Just use python os.system to get access to console commands

import os
os.system('python3 -m pytest -v')

In general case
os.system('python3 -m <name_of_file>.py')