Пример #1
0
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)
Пример #2
0
from main.main import main

main()
Пример #3
0
 def upload(self):
     main.main(self.inputFile, self.editFile, self.dateChange.get(),
               self.maxPriceEntry.get())
Пример #4
0
import pygame
from main.main import main

if __name__ == '__main__':
    #main()
    result = main()
Пример #5
0
 def test_main(self, mock_print, mock_random):
     main.main()
     print_calls = mock_print.call_args_list
     self.assertIn('win', str(print_calls))
Пример #6
0
 def test_mock_print_contains(self, mock_print, mock_random):
     main.main()
     mock_print.assert_called_with('win')
Пример #7
0
 def test_mock_print_count(self, mock_print, mock_random):
     main.main()
     self.assertEqual(2, mock_print.call_count)
Пример #8
0
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()