I am preparing python script which will control other python and linux scripts in correct sequence. And I have one doubt about below code:
import os
import unittest
class TestDict(unittest.TestCase):
x = factory.FileGenerator()
os.system('./linux_script.sh')
def test_dict(self):
self.assertDictEqual(self.test, self.json, 'Message')
As you can see at first I am preparing files and then run linux_script.sh. Next step is to compare two dict, but it cannot be done until linux script will be completed - the script is running other application which creates .json file. Until .json file is not prepared, test_dict cannot be executed because it will fail.
Question: python will be waiting for this line to be completed: os.system('./linux_script.sh, and then run test? If not how I can force python to do that?
PATHenvironment variable.