当前位置: 首页>>代码示例>>Python>>正文


Python CVSMaildirSource.parse方法代码示例

本文整理汇总了Python中buildbot.changes.mail.CVSMaildirSource.parse方法的典型用法代码示例。如果您正苦于以下问题:Python CVSMaildirSource.parse方法的具体用法?Python CVSMaildirSource.parse怎么用?Python CVSMaildirSource.parse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在buildbot.changes.mail.CVSMaildirSource的用法示例。


在下文中一共展示了CVSMaildirSource.parse方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_CVSMaildirSource_create_change_with_no_comment

# 需要导入模块: from buildbot.changes.mail import CVSMaildirSource [as 别名]
# 或者: from buildbot.changes.mail.CVSMaildirSource import parse [as 别名]
 def test_CVSMaildirSource_create_change_with_no_comment(self):
     # Strip off comments
     msg = cvs1_11_msg[:cvs1_11_msg.find('Commented out some stuff')]
     m = message_from_string(msg)
     src = CVSMaildirSource('/dev/null')
     chdict = src.parse(m)[1]
     self.assertEqual(chdict['comments'], None)
开发者ID:MPanH,项目名称:buildbot,代码行数:9,代码来源:test_changes_mail_CVSMaildirSource.py

示例2: test_CVSMaildirSource_create_change_with_no_repository

# 需要导入模块: from buildbot.changes.mail import CVSMaildirSource [as 别名]
# 或者: from buildbot.changes.mail.CVSMaildirSource import parse [as 别名]
 def test_CVSMaildirSource_create_change_with_no_repository(self):
     msg = cvs1_11_msg.replace(
         'CVSROOT: :ext:cvshost.example.com:/cvsroot', '')
     m = message_from_string(msg)
     src = CVSMaildirSource('/dev/null')
     chdict = src.parse(m)[1]
     self.assertEqual(chdict['repository'], None)
开发者ID:MPanH,项目名称:buildbot,代码行数:9,代码来源:test_changes_mail_CVSMaildirSource.py

示例3: test_CVSMaildirSource_create_change_with_no_files

# 需要导入模块: from buildbot.changes.mail import CVSMaildirSource [as 别名]
# 或者: from buildbot.changes.mail.CVSMaildirSource import parse [as 别名]
 def test_CVSMaildirSource_create_change_with_no_files(self):
     # A message with no files is likely not for us
     msg = cvs1_11_msg.replace('Files: base/module/src/make GNUmakefile,1.362,1.363', '')
     m = message_from_string(msg)
     src = CVSMaildirSource('/dev/null')
     chdict = src.parse(m)
     self.assertEqual(chdict, None)
开发者ID:ABI-Software,项目名称:buildbot,代码行数:9,代码来源:test_changes_mail_CVSMaildirSource.py

示例4: test_CVSMaildirSource_create_change_with_branch

# 需要导入模块: from buildbot.changes.mail import CVSMaildirSource [as 别名]
# 或者: from buildbot.changes.mail.CVSMaildirSource import parse [as 别名]
 def test_CVSMaildirSource_create_change_with_branch(self):
     # Branch is indicated after 'Tag:' in modified file list
     msg = cvs1_11_msg.replace('        GNUmakefile',
                               '      Tag: Test_Branch\n      GNUmakefile')
     m = message_from_string(msg)
     src = CVSMaildirSource('/dev/null')
     chdict = src.parse(m)[1]
     self.assertEqual(chdict['branch'], 'Test_Branch')
开发者ID:MPanH,项目名称:buildbot,代码行数:10,代码来源:test_changes_mail_CVSMaildirSource.py

示例5: test_CVSMaildirSource_create_change_with_category

# 需要导入模块: from buildbot.changes.mail import CVSMaildirSource [as 别名]
# 或者: from buildbot.changes.mail.CVSMaildirSource import parse [as 别名]
 def test_CVSMaildirSource_create_change_with_category(self):
     msg = cvs1_11_msg.replace('Category: None', 'Category: Test category')
     m = message_from_string(msg)
     src = CVSMaildirSource('/dev/null')
     try:
         chdict = src.parse( m )
     except:
         self.fail('Failed to get change from email message.')
     self.assert_(chdict['category'] == 'Test category')
开发者ID:LittleForker,项目名称:buildbot,代码行数:11,代码来源:test_changes_mail_CVSMaildirSource.py

示例6: test_CVSMaildirSource_create_change_with_property

# 需要导入模块: from buildbot.changes.mail import CVSMaildirSource [as 别名]
# 或者: from buildbot.changes.mail.CVSMaildirSource import parse [as 别名]
 def test_CVSMaildirSource_create_change_with_property(self):
     m = message_from_string(cvs1_11_msg)
     propDict = { 'foo' : 'bar' }
     src = CVSMaildirSource('/dev/null', urlmaker=fileToUrl, properties=propDict)
     try:
         chdict = src.parse( m )
     except:
         self.fail('Failed to get change from email message.')
     self.assert_(chdict['properties']['foo'] == 'bar')
开发者ID:LittleForker,项目名称:buildbot,代码行数:11,代码来源:test_changes_mail_CVSMaildirSource.py

示例7: test_CVSMaildirSource_create_change_with_no_repository

# 需要导入模块: from buildbot.changes.mail import CVSMaildirSource [as 别名]
# 或者: from buildbot.changes.mail.CVSMaildirSource import parse [as 别名]
 def test_CVSMaildirSource_create_change_with_no_repository(self):
     msg = cvs1_11_msg.replace('CVSROOT: :ext:cvshost.example.com:/cvsroot', '')
     m = message_from_string(msg)
     src = CVSMaildirSource('/dev/null')
     try:
         chdict = src.parse( m )
     except:
         self.fail('Failed to get change from email message.')
     self.assert_(chdict['repository'] == None )
开发者ID:LittleForker,项目名称:buildbot,代码行数:11,代码来源:test_changes_mail_CVSMaildirSource.py

示例8: test_CVSMaildirSource_create_change_with_no_project

# 需要导入模块: from buildbot.changes.mail import CVSMaildirSource [as 别名]
# 或者: from buildbot.changes.mail.CVSMaildirSource import parse [as 别名]
 def test_CVSMaildirSource_create_change_with_no_project(self):
     msg = cvs1_11_msg.replace('Project: MyModuleName', '')
     m = message_from_string(msg)
     src = CVSMaildirSource('/dev/null')
     try:
         chdict = src.parse( m )
     except:
         self.fail('Failed to get change from email message.')
     self.assert_(chdict['project'] == None )
开发者ID:LittleForker,项目名称:buildbot,代码行数:11,代码来源:test_changes_mail_CVSMaildirSource.py

示例9: test_CVSMaildirSource_create_change_from_cvs1_12_with_no_path

# 需要导入模块: from buildbot.changes.mail import CVSMaildirSource [as 别名]
# 或者: from buildbot.changes.mail.CVSMaildirSource import parse [as 别名]
 def test_CVSMaildirSource_create_change_from_cvs1_12_with_no_path(self):
     msg = cvs1_12_msg.replace('Path: base/module/src', '')
     m = message_from_string(msg)
     src = CVSMaildirSource('/dev/null')
     try:
         assert src.parse(m)[1]
     except ValueError:
         pass
     else:
         self.fail('Expect ValueError.')
开发者ID:MPanH,项目名称:buildbot,代码行数:12,代码来源:test_changes_mail_CVSMaildirSource.py

示例10: test_CVSMaildirSource_create_change_with_no_files

# 需要导入模块: from buildbot.changes.mail import CVSMaildirSource [as 别名]
# 或者: from buildbot.changes.mail.CVSMaildirSource import parse [as 别名]
 def test_CVSMaildirSource_create_change_with_no_files(self):
     # A message with no files is likely not for us
     msg = cvs1_11_msg.replace('Files: base/module/src/make GNUmakefile,1.362,1.363','')
     m = message_from_string(msg)
     src = CVSMaildirSource('/dev/null')
     try:
         chdict = src.parse( m )
     except:
         self.fail('Failed to get change from email message.')
     self.assert_(chdict == None )
开发者ID:LittleForker,项目名称:buildbot,代码行数:12,代码来源:test_changes_mail_CVSMaildirSource.py

示例11: test_CVSMaildirSource_create_change_with_no_comment

# 需要导入模块: from buildbot.changes.mail import CVSMaildirSource [as 别名]
# 或者: from buildbot.changes.mail.CVSMaildirSource import parse [as 别名]
 def test_CVSMaildirSource_create_change_with_no_comment(self):
     # Strip off comments
     msg = cvs1_11_msg[:cvs1_11_msg.find('Commented out some stuff')]
     m = message_from_string(msg)
     src = CVSMaildirSource('/dev/null')
     try:
         chdict = src.parse( m )
     except:
         self.fail('Failed to get change from email message.')
     self.assert_(chdict['comments'] == None )
开发者ID:LittleForker,项目名称:buildbot,代码行数:12,代码来源:test_changes_mail_CVSMaildirSource.py

示例12: test_CVSMaildirSource_create_change_with_bad_cvsmode

# 需要导入模块: from buildbot.changes.mail import CVSMaildirSource [as 别名]
# 或者: from buildbot.changes.mail.CVSMaildirSource import parse [as 别名]
 def test_CVSMaildirSource_create_change_with_bad_cvsmode(self):
     # Branch is indicated after 'Tag:' in modified file list
     msg = cvs1_11_msg.replace('Cvsmode: 1.11', 'Cvsmode: 9.99')
     m = message_from_string(msg)
     src = CVSMaildirSource('/dev/null')
     try:
         assert src.parse(m)[1]
     except ValueError:
         pass
     else:
         self.fail('Expected ValueError')
开发者ID:MPanH,项目名称:buildbot,代码行数:13,代码来源:test_changes_mail_CVSMaildirSource.py

示例13: test_CVSMaildirSource_create_change_with_branch

# 需要导入模块: from buildbot.changes.mail import CVSMaildirSource [as 别名]
# 或者: from buildbot.changes.mail.CVSMaildirSource import parse [as 别名]
 def test_CVSMaildirSource_create_change_with_branch(self):
     # Branch is indicated afer 'Tag:' in modified file list
     msg = cvs1_11_msg.replace('        GNUmakefile',
                               '      Tag: Test_Branch\n      GNUmakefile')
     m = message_from_string(msg)
     src = CVSMaildirSource('/dev/null')
     try:
         chdict = src.parse( m )
     except:
         self.fail('Failed to get change from email message.')
     self.assert_(chdict['branch'] == 'Test_Branch')
开发者ID:LittleForker,项目名称:buildbot,代码行数:13,代码来源:test_changes_mail_CVSMaildirSource.py

示例14: test_CVSMaildirSource_create_change_from_cvs1_11msg

# 需要导入模块: from buildbot.changes.mail import CVSMaildirSource [as 别名]
# 或者: from buildbot.changes.mail.CVSMaildirSource import parse [as 别名]
 def test_CVSMaildirSource_create_change_from_cvs1_11msg(self):
     m = message_from_string(cvs1_11_msg)
     src = CVSMaildirSource('/dev/null')
     src, chdict = src.parse(m)
     self.assertNotEqual(chdict, None)
     self.assertEqual(chdict['author'], 'andy')
     self.assertEqual(len(chdict['files']), 1)
     self.assertEqual(chdict['files'][0], 'base/module/src/make/GNUmakefile')
     self.assertEqual(chdict['comments'], 'Commented out some stuff.\n')
     self.assertFalse(chdict['isdir'])
     self.assertEqual(chdict['revision'], '2010-08-07 11:11:49')
     dateTuple = parsedate_tz('Sat, 07 Aug 2010 11:11:49 +0000')
     self.assertEqual(chdict['when'], mktime_tz(dateTuple))
     self.assertEqual(chdict['branch'], None)
     self.assertEqual(chdict['repository'], ':ext:cvshost.example.com:/cvsroot')
     self.assertEqual(chdict['project'], 'MyModuleName')
     self.assertEqual(len(chdict['properties']), 0)
     self.assertEqual(src, 'cvs')
开发者ID:ABI-Software,项目名称:buildbot,代码行数:20,代码来源:test_changes_mail_CVSMaildirSource.py

示例15: test_CVSMaildirSource_create_change_from_cvs1_12msg

# 需要导入模块: from buildbot.changes.mail import CVSMaildirSource [as 别名]
# 或者: from buildbot.changes.mail.CVSMaildirSource import parse [as 别名]
 def test_CVSMaildirSource_create_change_from_cvs1_12msg(self):
     m = message_from_string(cvs1_12_msg)
     src = CVSMaildirSource('/dev/null')
     src, chdict = src.parse(m)
     self.assertNotEqual(chdict, None)
     self.assertEqual(chdict['author'], 'andy')
     self.assertEqual(len(chdict['files']), 2)
     self.assertEqual(chdict['files'][0], 'base/module/src/file1.cpp')
     self.assertEqual(chdict['files'][1], 'base/module/src/file2.cpp')
     self.assertEqual(chdict['comments'], 'Changes for changes sake\n')
     self.assertFalse(chdict['isdir'])
     self.assertEqual(chdict['revision'], '2010-08-11 04:56:44')
     dateTuple = parsedate_tz('Wed, 11 Aug 2010 04:56:44 +0000')
     self.assertEqual(chdict['when'], mktime_tz(dateTuple))
     self.assertEqual(chdict['branch'], None)
     self.assertEqual(chdict['repository'], ':ext:cvshost.example.com:/cvsroot')
     self.assertEqual(chdict['project'], 'MyModuleName')
     self.assertEqual(len(chdict['properties']), 0)
     self.assertEqual(src, 'cvs')
开发者ID:ABI-Software,项目名称:buildbot,代码行数:21,代码来源:test_changes_mail_CVSMaildirSource.py


注:本文中的buildbot.changes.mail.CVSMaildirSource.parse方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。