Exemple #1
0
class TestMain(unittest.TestCase):
    def setUp(self):
        #
        pass
        self.main = Main("/tests/util/metacase/")
        # self.main = Main("metacase/")
        self.main.load_metaCases()

    def test_main(self):
        self.main.execute_metacases()
        # self.main.send_failMsg("")
        self.main.genarate_testReport()
Exemple #2
0
 def setUp(self):
     #
     pass
     self.main = Main("/tests/util/metacase/")
     # self.main = Main("metacase/")
     self.main.load_metaCases()
Exemple #3
0
#!/usr/bin/env python
# -*- coding:utf-8 -*-
__author__ = 'jfsu'

import os
import sys

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(BASE_DIR)

from core.main import Main

if __name__ == '__main__':
    func = Main()
Exemple #4
0
 def run(self):
     main = Main()
     main.start()
Exemple #5
0
import sys
import pygame

from core.main import Main

if __name__ == '__main__':
	main = Main()
	for arg in sys.argv[1:]:
		if len(arg) < 5:
			continue
		arg_type = arg[2:-2]
		arg_value = arg[-1:]
		if arg_type == 'fullscreen':
			main.setFullScreen(arg_value == '1')
		elif arg_type == 'camera':
			main.setUseCamera(arg_value == '1')
	main.run()
	pygame.quit()
	sys.exit()
Exemple #6
0
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# _AUTHOR_  : zhujingxiu
# _DATE_    : 2018/1/29

import os
import sys

sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

if __name__ == '__main__':
    from core.main import Main

    Main.service()
Exemple #7
0
import argparse
from core.main import Main


def _get_args():
    parser = argparse.ArgumentParser(
        description='Calculates distances between a dataset of audio files',
        formatter_class=argparse.ArgumentDefaultsHelpFormatter)
    parser.add_argument("in_path", action="store", help="Name of database")
    args = parser.parse_args()
    return args.in_path


if __name__ == '__main__':
    print('######################################')

    db_name = _get_args()
    if not db_name.endswith('.sqlite'):
        print('Provide a proper database file name. (for eg: db.sqlite)')
    else:
        main_obj = Main(db_name)
        main_obj.calc_feature_new()
        main_obj.show_similarity()
Exemple #8
0
from core.main import Main

if __name__ == '__main__':
    m = Main()
    m.start()
Exemple #9
0
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# _AUTHOR_  : zhujingxiu
# _DATE_    : 2018/1/29

import os
import sys

sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

if __name__ == '__main__':
    from conf import settings
    from core.main import Main

    Main(settings.ADDRESS).run()
Exemple #10
0
#!/usr/bin/python3
# -!- encoding:utf8 -!-
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# file:    cctv_manager.py
# date:    2017-01-12
# author:  paul dautry
# purpose:
#       
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

import signal

from PyQt5.QtWidgets import QMessageBox
from core.main import Main

def sigint_handler(*args):
    """Handler for the SIGINT signal."""
    sys.stderr.write('\r')
    if QMessageBox.question(None, '', "Are you sure you want to quit?",
                            QMessageBox.Yes | QMessageBox.No,
                            QMessageBox.No) == QMessageBox.Yes:
        QApplication.quit()

if __name__ == '__main__':
    signal.signal(signal.SIGINT, sigint_handler)
    m = Main()
    exit(m.exec())
Exemple #11
0
from core.main import Main

if __name__ == "__main__":
    app = Main(gpu=False)
    app.loop()