<commit_before>#! /usr/bin/env python
# -*- coding: utf-8 -*-

import unittest
from nose.plugins.attrib import attr
import imtools
import imtools.sample_data
import imtools.uiThreshold
import imtools.thresholding_functions
import matplotlib.pyplot as plt
import sys
from PyQt4.QtGui import QApplication, QDialog, QGridLayout, QPushButton
import numpy as np

class MyTestCase(unittest.TestCase):
    @attr('interactive')
    def test_something(self):
        self.assertEqual(True, False)

    def test_threshold(self):
        datap = imtools.sample_data.generate()
        uit = imtools.uiThreshold.uiThreshold(datap['data3d'], datap['voxelsize_mm'], interactivity=False, threshold=100)
        uit.run()

    def test_threshold_with_seed(self):
        datap = imtools.sample_data.generate()
        uit = imtools.uiThreshold.uiThreshold(datap['data3d'], datap['voxelsize_mm'], interactivity=False, seeds=datap["seeds_porta"])
        uit.run()

    @attr('interactive')
    def test_ui_threshold(self):
        datap = imtools.sample_data.generate()
        uit = imtools.uiThreshold.uiThreshold(datap['data3d'], datap['voxelsize_mm'], interactivity=True, threshold=100)
        uit.run()
        plt.show()


    @attr('interactive')
    def test_ui_threshold_qt(self):
        app = QApplication(sys.argv)
        datap = imtools.sample_data.generate()
        uit = imtools.uiThreshold.uiThresholdQt(datap['data3d'], datap['voxelsize_mm'], interactivity=True, threshold=100)

        uit.run()
        # plt.show()

    def test_getPriorityObject(self):
        import skimage.morphology
        nobj = 2<commit_msg>test gui matplotlib contructor<commit_after>#! /usr/bin/env python
# -*- coding: utf-8 -*-

import unittest
from nose.plugins.attrib import attr
import imtools
import imtools.sample_data
import imtools.uiThreshold
import imtools.thresholding_functions
import matplotlib.pyplot as plt
import sys
from PyQt4.QtGui import QApplication, QDialog, QGridLayout, QPushButton
import numpy as np

class MyTestCase(unittest.TestCase):
    @attr('interactive')
    def test_something(self):
        self.assertEqual(True, False)

    def test_threshold(self):
        datap = imtools.sample_data.generate()
        uit = imtools.uiThreshold.uiThreshold(datap['data3d'], datap['voxelsize_mm'], interactivity=False, threshold=100)
        uit.run()

    def test_threshold_with_seed(self):
        datap = imtools.sample_data.generate()
        uit = imtools.uiThreshold.uiThreshold(datap['data3d'], datap['voxelsize_mm'], interactivity=False, seeds=datap["seeds_porta"])
        uit.run()

    @attr('interactive')
    def test_ui_threshold(self):
        datap = imtools.sample_data.generate()
        uit = imtools.uiThreshold.uiThreshold(datap['data3d'], datap['voxelsize_mm'], interactivity=True, threshold=100)
        uit.run()
        plt.show()

    def test_gui_constructor(self):
        datap = imtools.sample_data.generate()
        uit = imtools.uiThreshold.uiThreshold(datap['data3d'], datap['voxelsize_mm'], interactivity=True, threshold=100)


    @attr('interactive')
    def test_ui_threshold_qt(self):
        app = QApplication(sys.argv)
        datap = imtools.sample_data.generate()
        uit = imtools.uiThreshold.uiThresholdQt(datap['data3d'], datap['voxelsize_mm'], interactivity=True, threshold=100)

        uit.run()
        # plt.show()

    def test_getPriorityObject(self):
        import skimage.morphology
        nobj = 2
{'fraction_non_alphanumeric': 0.11656087709174841, 'fraction_numerical': 0.0103866128101558, 'mean_word_length': 3.8421787709497206, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1523367', 'n_tokens_mistral': 1110, 'n_tokens_neox': 1082, 'n_words': 201}