当前位置: 首页>>代码示例>>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;未经允许,请勿转载。