コード例 #1
0
 def testBuildThreads(self):
     mainWindow = MainWindow()
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      buildThreadsSpinBox.isEnabled())
     self.assert_(
         mainWindow.advancedDialog.advancedDialog.buildColoringBiasSpinBox.
         value(), 1)
コード例 #2
0
 def testBuildColoringBias(self):
     mainWindow = MainWindow()
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  buildColoringBiasSpinBox.isEnabled())
     self.assert_(
         mainWindow.advancedDialog.advancedDialog.
         buildNumberOfColorsSpinBox.value(), 1)
コード例 #3
0
 def testWindow(self):
         mainWindow = MainWindow()
         file_button = mainWindow.userPreferencesDialog.fileDialog
         self.assert_(file_button.isEnabled())
         userpref_button = mainWindow.userPreferencesDialog.userPreferencesDialog
         self.assert_(userpref_button.isEnabled())
         self.assert_(mainWindow.userPreferencesDialog.userPreferencesSettingsFile.fallbacksEnabled())
コード例 #4
0
 def testSpinBox(self):
     mainWindow = MainWindow()
     #size of treelets
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleSizeOfTreeletsSpinBox.isEnabled())
     self.assert_(
         mainWindow.advancedDialog.advancedDialog.
         sampleSizeOfTreeletsSpinBox.value(), 1)
     #Number of samples
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleNumberOfSamplesSpinBox.isEnabled())
     self.assert_(
         mainWindow.advancedDialog.advancedDialog.
         sampleNumberOfSamplesSpinBox.value(), 1000000)
     #Threads
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleThreadsSpinBox.isEnabled())
     self.assert_(
         mainWindow.advancedDialog.advancedDialog.sampleThreadsSpinBox.
         value(), 1)
     #Sample time budget
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      sampleTimeBudgetSpinBox.isEnabled())
     #treelet buffer size
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      sampleTreeletBufferSizeSpinBox.isEnabled())
     #treelet buffer degree
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      sampleTreeletBufferDegreeSpinBox.isEnabled())
     #proportional number of starts
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      sampleNumberOfStarsSpinBox.isEnabled())
コード例 #5
0
 def testBuilTableSize(self):
     mainWindow = MainWindow()
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  buildTableSizeSpinBox.isEnabled())
     self.assert_(
         mainWindow.advancedDialog.advancedDialog.buildTableSizeSpinBox.
         value(), 1)
コード例 #6
0
 def testSpinBox(self):
     mainWindow = MainWindow()
     graphletSize = mainWindow.basicDialog.basicDialog.graphletSizeSpinBox
     self.assert_(graphletSize.value(), 1)
     numSample = mainWindow.basicDialog.basicDialog.numberOfSamplesSpinBox
     self.assert_(numSample.value(), 1000000)
     threads = mainWindow.basicDialog.basicDialog.threadsSpinBox
     self.assert_(threads.value(), 1)
コード例 #7
0
 def testCheckboxNumberofSamples(self):
     mainWindow = MainWindow()
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleNumberOfSamplesCheckBox.isChecked())
     QTest.mouseClick(
         mainWindow.advancedDialog.advancedDialog.
         sampleNumberOfSamplesCheckBox, Qt.LeftButton)
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      sampleNumberOfSamplesCheckBox.isChecked())
コード例 #8
0
 def testBuildTextBoxes(self):
     mainWindow = MainWindow()
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      buildTablesBasenameLineEdit.isEnabled())
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      buildTreeletsFileLineEdit.isEnabled())
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  buildSeedLineEdit.isEnabled())
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  buildSeedLineEdit.text() == '')
コード例 #9
0
    def testCombination(self):
        mainWindow = MainWindow()
        QTest.mouseClick(
            mainWindow.advancedDialog.advancedDialog.
            sampleEstimateOccurencesCheckBox, Qt.LeftButton)
        self.assert_(mainWindow.advancedDialog.advancedDialog.
                     sampleEstimateOccurencesCheckBox.isChecked())
        self.assert_(mainWindow.advancedDialog.advancedDialog.
                     sampleGraphletsCheckBox.isChecked())
        self.assert_(mainWindow.advancedDialog.advancedDialog.
                     sampleNoSpanningTreesCheckBox.isChecked())
        self.assert_(mainWindow.advancedDialog.advancedDialog.
                     sampleGroupCheckBox.isChecked())
        self.assert_(mainWindow.advancedDialog.advancedDialog.
                     sampleVerticesCheckBox.isChecked())
        self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                         sampleEstimateOccurencesAdaptiveCheckBox.isChecked())
        self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                         sampleCanonicizeCheckBox.isChecked())

        QTest.mouseClick(
            mainWindow.advancedDialog.advancedDialog.
            sampleEstimateOccurencesAdaptiveCheckBox, Qt.LeftButton)
        self.assert_(mainWindow.advancedDialog.advancedDialog.
                     sampleEstimateOccurencesCheckBox.isChecked())
        self.assert_(mainWindow.advancedDialog.advancedDialog.
                     sampleGraphletsCheckBox.isChecked())
        self.assert_(mainWindow.advancedDialog.advancedDialog.
                     sampleNoSpanningTreesCheckBox.isChecked())
        self.assert_(mainWindow.advancedDialog.advancedDialog.
                     sampleGroupCheckBox.isChecked())
        self.assert_(mainWindow.advancedDialog.advancedDialog.
                     sampleVerticesCheckBox.isChecked())
        self.assert_(mainWindow.advancedDialog.advancedDialog.
                     sampleEstimateOccurencesAdaptiveCheckBox.isChecked())
        self.assert_(mainWindow.advancedDialog.advancedDialog.
                     sampleCanonicizeCheckBox.isChecked())

        QTest.mouseClick(
            mainWindow.advancedDialog.advancedDialog.
            sampleEstimateOccurencesCheckBox, Qt.LeftButton)
        self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                         sampleEstimateOccurencesCheckBox.isChecked())
        self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                         sampleGraphletsCheckBox.isChecked())
        self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                         sampleNoSpanningTreesCheckBox.isChecked())
        self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                         sampleGroupCheckBox.isChecked())
        self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                         sampleVerticesCheckBox.isChecked())
        self.assert_(mainWindow.advancedDialog.advancedDialog.
                     sampleEstimateOccurencesAdaptiveCheckBox.isChecked())
        self.assert_(mainWindow.advancedDialog.advancedDialog.
                     sampleCanonicizeCheckBox.isChecked())
コード例 #10
0
 def testButtonInputGraph(self):
     mainWindow = MainWindow()
     input_graph = mainWindow.basicDialog.basicDialog.selectInputFileButton
     self.assert_(input_graph.isEnabled())
     QTest.mouseClick(input_graph, Qt.LeftButton)
     self.assert_(mainWindow.basicDialog.fileDialog.isEnabled())
     output_graph = mainWindow.basicDialog.basicDialog.selectOutputFileButton
     self.assert_(output_graph.isEnabled())
     QTest.mouseClick(output_graph, Qt.LeftButton)
     file_dialog1 = mainWindow.basicDialog.fileDialog
     self.assert_(file_dialog1.isEnabled())
コード例 #11
0
 def testSampleButtonProgressBar(self):
     mainWindow = MainWindow()
     file_button = mainWindow.advancedDialog.fileDialog
     self.assert_(file_button.isEnabled())
     mainWindow.advancedDialog.advancedDialog.show()
     self.assert_(mainWindow.advancedDialog.advancedDialog.isVisible())
     QTest.mouseClick(mainWindow.advancedDialog.advancedDialog.sampleTab,
                      Qt.LeftButton)
     sample_button = mainWindow.advancedDialog.advancedDialog.sampleButton
     self.assertFalse(sample_button.isEnabled())
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleProgressBar.isEnabled())
コード例 #12
0
 def testBuildTreeletCount(self):
     mainWindow = MainWindow()
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      buildSelectTreeletsFileButton.isEnabled())
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      buildSelectiveCountCheckBox.isChecked())
     QTest.mouseClick(
         mainWindow.advancedDialog.advancedDialog.
         buildSelectiveCountCheckBox, Qt.LeftButton)
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  buildSelectTreeletsFileButton.isEnabled())
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  buildTreeletsFileLineEdit.text() == '')
コード例 #13
0
 def testTextBox(self):
     mainWindow = MainWindow()
     #Tables basename
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleTablesBasenameLineEdit.text() == '')
     #seed
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleSeedLineEdit.text() == '')
     #selective sampling
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleSelectTreeletsToBuildFileLineEdit.text() == '')
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleSelectTreeletsToSampleFileLineEdit.text() == '')
コード例 #14
0
 def testBuildMergeButtonProgressbar(self):
     mainWindow = MainWindow()
     QTest.mouseClick(mainWindow.advancedDialog.advancedDialog.buildTab,
                      Qt.LeftButton)
     merge_button = mainWindow.advancedDialog.advancedDialog.mergeButton
     self.assertFalse(merge_button.isEnabled())
     build_button = mainWindow.advancedDialog.advancedDialog.buildButton
     self.assertFalse(build_button.isEnabled())
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      buildSelectTreeletsFileButton.isEnabled())
     self.assert_(mainWindow.advancedDialog.advancedDialog.buildProgressBar.
                  isEnabled())
     self.assert_(mainWindow.advancedDialog.advancedDialog.mergeProgressBar.
                  isEnabled())
コード例 #15
0
 def testTimeBudget(self):
     mainWindow = MainWindow()
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      sampleTimeBudgetCheckBox.isChecked())
     QTest.mouseClick(
         mainWindow.advancedDialog.advancedDialog.sampleTimeBudgetCheckBox,
         Qt.LeftButton)
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleTimeBudgetCheckBox.isChecked())
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleTimeBudgetSpinBox.isEnabled())
     self.assert_(
         mainWindow.advancedDialog.advancedDialog.sampleTimeBudgetSpinBox.
         value(), 1)
コード例 #16
0
 def testCheckBox(self):
     mainWindow = MainWindow()
     adaptiveCheckBox = mainWindow.basicDialog.basicDialog.adaptiveCheckBox
     self.assertFalse(adaptiveCheckBox.isChecked())
     QTest.mouseClick(adaptiveCheckBox, Qt.LeftButton)
     self.assert_(adaptiveCheckBox.isChecked())
     starsCheckBox = mainWindow.basicDialog.basicDialog.computeStarsCheckBox
     self.assert_(starsCheckBox.isChecked())
     QTest.mouseClick(starsCheckBox, Qt.LeftButton)
     self.assertFalse(starsCheckBox.isChecked())
     compressThreshold = mainWindow.basicDialog.basicDialog.compressThresholdCheckBox
     self.assertFalse(compressThreshold.isChecked())
     QTest.mouseClick(compressThreshold, Qt.LeftButton)
     self.assert_(compressThreshold.isChecked())
コード例 #17
0
 def testBuildMergeInputOutput(self):
     mainWindow = MainWindow()
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  buildSelectInputFileButton.isEnabled())
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  buildSelectOutputFileButton.isEnabled())
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  mergeSelectOutputFileButton.isEnabled())
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  buildInputFileLineEdit.text() == '')
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  buildOutputFileLineEdit.text() == '')
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  mergeOutputFileLineEdit.text() == '')
コード例 #18
0
 def testInputOutput(self):
     mainWindow = MainWindow()
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleSelectInputFileButton.isEnabled())
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleSelectOutputFileButton.isEnabled())
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      sampleSelectTreeletsToBuildFileButton.isEnabled())
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      sampleSelectTreeletsToSampleFileButton.isEnabled())
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleInputFileLineEdit.text() == '')
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleOutputFileLineEdit.text() == '')
コード例 #19
0
 def testBuildToVertexCheckBox(self):
     mainWindow = MainWindow()
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  buildToVertexCheckBox.isEnabled())
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  buildToVertexCheckBox.isChecked())
     QTest.mouseClick(
         mainWindow.advancedDialog.advancedDialog.buildToVertexCheckBox,
         Qt.LeftButton)
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  buildToVertexSpinBox.isEnabled())
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      buildToVertexCheckBox.isChecked())
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  buildToVertexSpinBox.text() == '0')
コード例 #20
0
 def testDefaultcheckboxes(self):
     mainWindow = MainWindow()
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      sampleGraphletsCheckBox.isChecked())
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      sampleEstimateOccurencesCheckBox.isChecked())
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      sampleEstimateOccurencesAdaptiveCheckBox.isChecked())
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      sampleCanonicizeCheckBox.isChecked())
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      sampleNoSpanningTreesCheckBox.isChecked())
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      sampleGroupCheckBox.isChecked())
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      sampleVerticesCheckBox.isChecked())
コード例 #21
0
 def testMergeCompressThresholdCheckBox(self):
     mainWindow = MainWindow()
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  mergeCompressThresholdCheckBox.isEnabled())
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      mergeCompressThresholdCheckBox.isChecked())
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      mergeCompressThresholdSpinBox.isEnabled())
     QTest.mouseClick(
         mainWindow.advancedDialog.advancedDialog.
         mergeCompressThresholdCheckBox, Qt.LeftButton)
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  mergeCompressThresholdCheckBox.isChecked())
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  mergeCompressThresholdSpinBox.isEnabled())
     self.assert_(
         mainWindow.advancedDialog.advancedDialog.
         mergeCompressThresholdSpinBox.value(), 1)
コード例 #22
0
 def testSelectiveBuildingSampling(self):
     mainWindow = MainWindow()
     self.assertFalse(
         mainWindow.advancedDialog.advancedDialog.
         sampleEnableSelectiveBuildAndSamplingCheckBox.isChecked())
     QTest.mouseClick(
         mainWindow.advancedDialog.advancedDialog.
         sampleEnableSelectiveBuildAndSamplingCheckBox, Qt.LeftButton)
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleEnableSelectiveBuildAndSamplingCheckBox.isChecked())
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleSelectTreeletsToBuildFileButton.isEnabled())
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleSelectTreeletsToSampleFileButton.isEnabled())
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleSelectTreeletsToBuildFileLineEdit.text() == '')
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleSelectTreeletsToSampleFileLineEdit.text() == '')
コード例 #23
0
 def testTreeletBuffering(self):
     mainWindow = MainWindow()
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      sampleEnableTreeletBufferingCheckBox.isChecked())
     QTest.mouseClick(
         mainWindow.advancedDialog.advancedDialog.
         sampleEnableTreeletBufferingCheckBox, Qt.LeftButton)
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleEnableTreeletBufferingCheckBox.isChecked())
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleTreeletBufferSizeSpinBox.isEnabled())
     self.assert_(
         mainWindow.advancedDialog.advancedDialog.
         sampleTreeletBufferSizeSpinBox.value(), 10000)
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleTreeletBufferDegreeSpinBox.isEnabled())
     self.assert_(
         mainWindow.advancedDialog.advancedDialog.
         sampleTreeletBufferDegreeSpinBox.value(), 1)
コード例 #24
0
 def testSmartStars(self):
     mainWindow = MainWindow()
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleSmartStarsCheckBox.isChecked())
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleNumberOfStarsCheckBox.isChecked())
     QTest.mouseClick(
         mainWindow.advancedDialog.advancedDialog.
         sampleNumberOfStarsCheckBox, Qt.LeftButton)
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      sampleNumberOfStarsCheckBox.isChecked())
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  sampleNumberOfStarsSpinBox.isEnabled())
     self.assert_(
         mainWindow.advancedDialog.advancedDialog.
         sampleNumberOfStarsSpinBox.value(), 1)
     QTest.mouseClick(
         mainWindow.advancedDialog.advancedDialog.sampleSmartStarsCheckBox,
         Qt.LeftButton)
コード例 #25
0
 def testButtonRunMotivo(self):
     mainWindow = MainWindow()
     motivo_button = mainWindow.basicDialog.basicDialog.runMotivoButton
     self.assertFalse(motivo_button.isEnabled())
コード例 #26
0
 def testLineEmpty(self):
     mainWindow = MainWindow()
     inputText = mainWindow.basicDialog.basicDialog.inputFileLineEdit
     self.assertFalse(inputText.isModified())
     outputText = mainWindow.basicDialog.basicDialog.outputFileLineEdit
     self.assertFalse(outputText.isModified())
コード例 #27
0
    def testButton(self):
            mainWindow = MainWindow()
            self.assert_(mainWindow.userPreferencesDialog.userPreferencesDialog.setDirectoryButton.isEnabled())
            self.assert_(mainWindow.userPreferencesDialog.userPreferencesDialog.selectMotivoDirectoryButton.isEnabled())

            self.assert_(mainWindow.userPreferencesDialog.userPreferencesDialog.motivoDirectoryLineEdit.text() != "" )
コード例 #28
0
 def testMergeCompressThreshold(self):
     mainWindow = MainWindow()
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      mergeCompressThresholdSpinBox.isEnabled())
コード例 #29
0
 def testBuildToVertex(self):
     mainWindow = MainWindow()
     self.assertFalse(mainWindow.advancedDialog.advancedDialog.
                      buildToVertexSpinBox.isEnabled())
コード例 #30
0
 def testBuildFromVertex(self):
     mainWindow = MainWindow()
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  buildFromVertexSpinBox.isEnabled())
     self.assert_(mainWindow.advancedDialog.advancedDialog.
                  buildFromVertexSpinBox.text() == '0')