Пример #1
0
    def setUp(self):
        """
        sets up dbs manager instance
        """

        print('\nsetUp: getting dbs manager to access current datasets '\
              '(and fetching them if needed)')
        # set up only once
        if not self.global_dbs_mngr:
            self.global_dbs_mngr = initialize_global_dbs_mngr()
        self.inst = get_global_dbs_inst()
Пример #2
0
    def setUp(self):
        """
        sets up dbs manager instance
        """

        print('\nsetUp: getting dbs manager to access current datasets '\
              '(and fetching them if needed)')
        # set up only once
        if not self.global_dbs_mngr:
            self.global_dbs_mngr = initialize_global_dbs_mngr()
        self.inst = get_global_dbs_inst()
Пример #3
0
    def __init__(cls, name, bases, d):
        type.__init__(cls, name, bases, d)

        # set up only once
        if hasattr(cls, 'global_dbs_inst') and cls.global_dbs_inst:
            return

        print 'setUp in metaclass: getting dbs manager ' \
              '(and fetching datasets if needed)'
        cls.global_dbs_mngr = initialize_global_dbs_mngr(update_required=False)
        cls.global_dbs_inst = get_global_dbs_inst()
        cls.kws = KeywordSearch(dascore=DASCore(multitask=False))
        dasconfig = das_readconfig()
        cls.timeout = dasconfig['keyword_search']['timeout']
Пример #4
0
    def __init__(cls, name, bases, d):
        type.__init__(cls, name, bases, d)

        # set up only once
        if hasattr(cls, 'global_dbs_inst') and cls.global_dbs_inst:
            return

        print('setUp in metaclass: getting dbs manager ' \
              '(and fetching datasets if needed)')
        cls.global_dbs_mngr = initialize_global_dbs_mngr(update_required=False)
        cls.global_dbs_inst = get_global_dbs_inst()
        cls.kws = KeywordSearch(dascore=DASCore(multitask=False))
        dasconfig = das_readconfig()
        cls.timeout = dasconfig['keyword_search']['timeout']