Exemplo n.º 1
0
def setup_rcparams():
    rcParams.defaultParams['console.start_channels'][0] = False
    rcParams.defaultParams['main.listen_to_port'][0] = False
    rcParams.defaultParams['help_explorer.render_docs_parallel'][0] = False
    rcParams.defaultParams['help_explorer.use_intersphinx'][0] = False
    rcParams.defaultParams['plugins.include'][0] = ['psyplot_gui_test.plugin']
    rcParams.defaultParams['plugins.exclude'][0] = 'all'
    rcParams.update_from_defaultParams()
Exemplo n.º 2
0
def setup_rcparams():
    rcParams.defaultParams['console.start_channels'][0] = False
    rcParams.defaultParams['main.listen_to_port'][0] = False
    rcParams.defaultParams['help_explorer.render_docs_parallel'][0] = False
    rcParams.defaultParams['help_explorer.use_intersphinx'][0] = False
    rcParams.defaultParams['plugins.include'][0] = ['straditize.widgets']
    rcParams.defaultParams['plugins.exclude'][0] = 'all'
    rcParams.update_from_defaultParams()
Exemplo n.º 3
0
 def tearDown(self):
     import psyplot.project as psy
     self.window.close()
     del self.window
     psy.close('all')
     rcParams.update_from_defaultParams()
     psy_rcParams.update_from_defaultParams()
     rcParams.disconnect()
     psy_rcParams.disconnect()
Exemplo n.º 4
0
 def tearDownClass(cls):
     if not running_in_gui:
         import psyplot_gui.main as main
         cls.window.close()
         rcParams.update_from_defaultParams()
         psy_rcParams.update_from_defaultParams()
         rcParams.disconnect()
         psy_rcParams.disconnect()
         main._set_mainwindow(None)
         del cls.window, cls.straditizer_widgets
Exemplo n.º 5
0
 def tearDown(self):
     import psyplot.project as psy
     import matplotlib.pyplot as plt
     if not running_in_gui:
         import psyplot_gui.main as main
         self.window.close()
         rcParams.update_from_defaultParams()
         psy_rcParams.update_from_defaultParams()
         rcParams.disconnect()
         psy_rcParams.disconnect()
         main._set_mainwindow(None)
     del self.window
     psy.close('all')
     plt.close('all')
Exemplo n.º 6
0
 def tearDown(self):
     import psyplot.project as psy
     import matplotlib.pyplot as plt
     if not running_in_gui:
         import psyplot_gui.main as main
         self.window.close()
         rcParams.update_from_defaultParams()
         psy_rcParams.update_from_defaultParams()
         rcParams.disconnect()
         psy_rcParams.disconnect()
         main._set_mainwindow(None)
     del self.window
     psy.close('all')
     plt.close('all')
Exemplo n.º 7
0
 def reset_rcParams(self):
     rcParams.update_from_defaultParams()
     psy.rcParams.update_from_defaultParams()
Exemplo n.º 8
0
test_dir = osp.dirname(__file__)
setup_logging(osp.join(test_dir, 'logging.yml'), env_key='')

from psyplot_gui.compat.qtcompat import QApplication
from psyplot_gui import rcParams
from psyplot import rcParams as psy_rcParams


on_travis = os.environ.get('TRAVIS')

rcParams.defaultParams['main.listen_to_port'][0] = False
rcParams.defaultParams['help_explorer.render_docs_parallel'][0] = False
rcParams.defaultParams['help_explorer.use_intersphinx'][0] = False
rcParams.defaultParams['plugins.include'][0] = ['psyplot_gui_test.plugin']
rcParams.defaultParams['plugins.exclude'][0] = 'all'
rcParams.update_from_defaultParams()


class PsyPlotGuiTestCase(unittest.TestCase):
    """A base class for testing the psyplot_gui module

    At the initializzation of the TestCase, a new
    :class:`psyplot_gui.main.MainWindow` widget is created which is closed at
    the end of all the tests"""

    @classmethod
    def setUpClass(cls):
        cls._app = QApplication.instance()
        if cls._app is None:
            cls._app = QApplication([])
        cls._app.setQuitOnLastWindowClosed(False)
Exemplo n.º 9
0
 def reset_rcParams(self):
     rcParams.update_from_defaultParams()
     psy.rcParams.update_from_defaultParams()