def done(): imageL = list() imageR = list() for i in range(0, NUM_STEPS): imageL.append(images[i]['left']) imageR.append(images[i]['right']) setup() json_data = main(imageL, imageR) emit('recognised', json_data, json=True, broadcast=True)
from main.main import main main()
def upload(self): main.main(self.inputFile, self.editFile, self.dateChange.get(), self.maxPriceEntry.get())
import pygame from main.main import main if __name__ == '__main__': #main() result = main()
def test_main(self, mock_print, mock_random): main.main() print_calls = mock_print.call_args_list self.assertIn('win', str(print_calls))
def test_mock_print_contains(self, mock_print, mock_random): main.main() mock_print.assert_called_with('win')
def test_mock_print_count(self, mock_print, mock_random): main.main() self.assertEqual(2, mock_print.call_count)
from main import main import os import shutil import argparse list_delete= ['log_shelf.db.dat', 'log_shelf.db.dir', 'log_shelf.db.bak', 'log_shelf.db', 'last_seen.db', 'last_seen.db.dat', 'last_seen.db.dir', 'last_seen.db.bak', 'Logs', 'node_list_shelf.db'] parser = argparse.ArgumentParser() parser.add_argument('-c','--continue', action = "store_true", default = False, help = "Use this argument to continue without removing previous logs" ) args = vars(parser.parse_args()) if not args['continue']: for value in list_delete: path= os.path.join(os.path.dirname(__file__),value ) if os.path.exists(path): if os.path.isdir(path): shutil.rmtree(path) else: os.remove(path) print("Removing: " + path) os.mkdir('Logs') main.main()