當前位置: 首頁>>代碼示例>>Python>>正文


Python AT.AT類代碼示例

本文整理匯總了Python中admit.AT.AT的典型用法代碼示例。如果您正苦於以下問題:Python AT類的具體用法?Python AT怎麽用?Python AT使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了AT類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_AT_markUpToDate

    def test_AT_markUpToDate(self):
        """ test AT isstale(), markUpToDate() """
        at = AT({'alias': 'n'})
        self.assertTrue(at.isstale())

        at.markUpToDate()
        self.assertFalse(at.isstale())
開發者ID:radio-astro,項目名稱:casa,代碼行數:7,代碼來源:test_admit.py

示例2: test_baseDir

    def test_baseDir(self):
        at = AT({'alias': 'g'})
        basedir = at.baseDir("/tmp/")
        if(self.verbose):
            print "\nAT Class base directory", basedir
 
        self.assertEqual(basedir, "/tmp/")
開發者ID:teuben,項目名稱:admit,代碼行數:7,代碼來源:unittest_AT.py

示例3: test_FM_add_remove

    def test_FM_add_remove(self):
        """ test FM add() and remove() """
        fm = admit.Flow()

        # connection map diagram: a0->a1->a2->a3
        # structure of an element of the triple-nested dictionary of connmap:
        #     src_taskid: {des_taskid: {des_bdpport: (si,sp, di,dp)}}

        self.correct_connmap = {0: {1: {0: (0, 0, 1, 0)}},
                                1: {2: {0: (1, 0, 2, 0)}},
                                2: {3: {0: (2, 0, 3, 0)}}}
        tasklist= list()
        for i in range(0,4):
            a = AT()
            a._baseDir = admit.Project.baseDir
            # Each AT needs an output BDP
            b = File_BDP();
            b.type="TEST_BDP%d" % i
            a._bdp_out.append( b )
            tasklist.append( a )
            if i == 0:
                taskid = fm.add( tasklist[i] )
            else:
                taskid = fm.add( tasklist[i], [(tasklist[i-1]._taskid,0)])
        self.assertEqual(fm._connmap, self.correct_connmap)

        # Remove a2 and its downstream from a0->a1->a2->a3
        # The result diagram is a0->a1
        self.correct_connmap = {0: {1: {0: (0, 0, 1, 0)}}}
        fm.remove(2)
        self.assertEqual(fm._connmap, self.correct_connmap)
開發者ID:radio-astro,項目名稱:casa,代碼行數:31,代碼來源:test_admit.py

示例4: test_AT_loggername

 def test_AT_loggername(self):
     """ test AT set/getloggername() """
     at = AT({'alias': 'log'})
     name = "admit_logger"
     at.setloggername(name)
     ret = at.getloggername()
     self.assertEqual(ret, name)
開發者ID:radio-astro,項目名稱:casa,代碼行數:7,代碼來源:test_admit.py

示例5: test_AT_baseDir

 def test_AT_baseDir(self):
     """ test AT baseDir(), dir() """
     at = AT({'alias': 'g'})
     basedir = at.baseDir("/tmp/")
     self.assertEqual(basedir, "/tmp/")
     fullpath = at.dir("test.test")
     self.assertEqual(fullpath, "/tmp/test.test")
開發者ID:radio-astro,項目名稱:casa,代碼行數:7,代碼來源:test_admit.py

示例6: test_len2

    def test_len2(self):
        at = AT({'alias': 'c'})
        tuple = at.len2() # bdp_in and bdp_out tuple
        if(self.verbose):
            print "\nAT Class (bdp_in, bdp_out):", tuple
 
        self.assertEqual(tuple, (0,0))  ## should be (0,0)
開發者ID:teuben,項目名稱:admit,代碼行數:7,代碼來源:unittest_AT.py

示例7: test_effectivelevel

    def test_effectivelevel(self):
        at = AT({'alias': 'f'})
        at.seteffectivelevel(40)
        level = at.geteffectivelevel()
        if(self.verbose):
            print "\nAT Class effective logging level", level
 
        self.assertEqual(level, 40)
開發者ID:teuben,項目名稱:admit,代碼行數:8,代碼來源:unittest_AT.py

示例8: test_dir

    def test_dir(self):
        at = AT({'alias': 'h'})
        basedir = at.baseDir("/tmp/")
        fullpath = at.dir("test.test")
        if(self.verbose):
            print "\nAT Fullpath:", fullpath
 
        self.assertEqual(fullpath, "/tmp/test.test")
開發者ID:teuben,項目名稱:admit,代碼行數:8,代碼來源:unittest_AT.py

示例9: test_enabled

    def test_enabled(self):
        at = AT({'alias': 'm'})
        at.enabled(False)
        after = at._enabled
        if(self.verbose):
            print "\nAT Class state _enabled", after
 
        self.assertEqual(after, False)
開發者ID:teuben,項目名稱:admit,代碼行數:8,代碼來源:unittest_AT.py

示例10: test_markChanged

    def test_markChanged(self):
        at = AT({'alias': 'p'})
        at.markChanged()
        state = at._stale
        if(self.verbose):
            print "\nAT Class state _stale", state
 
        self.assertEqual(state, True)
開發者ID:teuben,項目名稱:admit,代碼行數:8,代碼來源:unittest_AT.py

示例11: test_AT_isAutoAlias

    def test_AT_isAutoAlias(self):
        """ test AT isAutoAlias() """
        at = AT()
        self.assertTrue(at.isAutoAlias())

        at = AT({'alias': 'alias_test', 'test_key': 'at_test'})
        ret = at.isAutoAlias(withEmpty=False)
        self.assertFalse(ret)
開發者ID:radio-astro,項目名稱:casa,代碼行數:8,代碼來源:test_admit.py

示例12: test_isAutoAlias

    def test_isAutoAlias(self):
        at = AT()
        ret = at.isAutoAlias()
        self.assertTrue(ret)  # should be true

        at = AT({'alias': 'alias_test', 'test_key': 'at_test'})
        ret = at.isAutoAlias(withEmpty=False)
        self.assertFalse(ret)  # should be false
開發者ID:teuben,項目名稱:admit,代碼行數:8,代碼來源:unittest_AT.py

示例13: test_AT_logginglevel

 def test_AT_logginglevel(self):
     """ test AT setlogginglevel and getlogginglevel methods """
     # CRITICAL    50
     at = AT({'alias': 'e'})
     at.setlogginglevel(50)
     level = at.getlogginglevel()
     self.assertEqual(level, 50)
     self.assertEqual(level, logging.CRITICAL)
開發者ID:radio-astro,項目名稱:casa,代碼行數:8,代碼來源:test_admit.py

示例14: __init__

 def __init__(self,**keyval):
     keys = {
            }
     AT.__init__(self,keys,keyval)
     self._version = "0.0.1"
     self.set_bdp_in([(Image_BDP,1,bt.REQUIRED),
                      (CubeStats_BDP,1,bt.OPTIONAL)])
     self.set_bdp_out([])
開發者ID:teuben,項目名稱:admit,代碼行數:8,代碼來源:FeatureList_AT.py

示例15: __init__

 def __init__(self, **keyval):
     keys = {
         "basename"   : "",     # defaults to BDP derived
     }
     AT.__init__(self,keys,keyval)
     self._version = "1.0.0"
     self.set_bdp_in([(Image_BDP,     1, bt.REQUIRED)])
     self.set_bdp_out([])
開發者ID:teuben,項目名稱:admit,代碼行數:8,代碼來源:Export_AT.py


注:本文中的admit.AT.AT類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。