Ejemplo n.º 1
0
 def setUp(self):
     self.gui = Main()
     self.model = Model()
     self.model.setGui(self.gui)
     self.gui.setModel(self.model)
     self.model.addNode('2jmj7l5rSw0yVb/vlWAYkK/YBwk=', 'adsa', '192.168.0.1')
     self.model.addNode('2jmj7l5rSw0yVb/vlWAYkK/YCwk=',  'sss', '192.168.0.2')
     self.model.addNode('2jmj7l5rSw0yVb/vlWAYkK/YDwk=',  'ccc', '192.168.0.3')
Ejemplo n.º 2
0
class TestModelMatrix(unittest.TestCase):

    def setUp(self):
        self.gui = Main()
        self.model = Model()
        self.model.setGui(self.gui)
        self.gui.setModel(self.model)
        self.model.addNode('2jmj7l5rSw0yVb/vlWAYkK/YBwk=', 'adsa', '192.168.0.1')
        self.model.addNode('2jmj7l5rSw0yVb/vlWAYkK/YCwk=',  'sss', '192.168.0.2')
        self.model.addNode('2jmj7l5rSw0yVb/vlWAYkK/YDwk=',  'ccc', '192.168.0.3')

    def test_emptyMatrix(self):
        row1 = [1,  2,  3]
        row2 = [4,  5,  3]
        row3 = [0,  0,  0]
        matrix = [row1,  row2,  row3]
        vec = ["jeden",  "dwa",  "trzy"]
        
        self.model.addMatrix(matrix,  vec)
            
    def test_theSameMatrix(self):
        self.test_emptyMatrix()
        self.test_emptyMatrix()
Ejemplo n.º 3
0
    app = QApplication(sys.argv)

    ############################################################################
    # CONTEXT
    context = Context()

    ############################################################################
    # RESULT TABLE
    result_table = ResultTable(context)

    ############################################################################
    # Modules Init
    profiler = Profiler()
    engine_manager = EngineManager(context, profiler, result_table)
    file_manager = FileManager()

    ############################################################################
    # EDITOR
    editor = CodeEditor(context)
    highlight = CodePainter(editor.document(), STYLES)

    window = Main(context, app, editor, engine_manager, file_manager, profiler, result_table)
    if context.window['maximized']:
        window.showMaximized()
    else:
        window.show()

    ############################################################################
    # END
    sys.exit(app.exec_())