本文整理汇总了Python中FedoraReview.Mock._get_root方法的典型用法代码示例。如果您正苦于以下问题:Python Mock._get_root方法的具体用法?Python Mock._get_root怎么用?Python Mock._get_root使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FedoraReview.Mock
的用法示例。
在下文中一共展示了Mock._get_root方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_mock_configdir
# 需要导入模块: from FedoraReview import Mock [as 别名]
# 或者: from FedoraReview.Mock import _get_root [as 别名]
def test_mock_configdir(self):
self.init_test('test_misc',
argv=['-n','python-test'],
buildroot='default',
options='--configdir=mock-config')
Mock.reset()
Mock._get_root()
self.assertEqual(Mock.mock_root, 'fedora-12-i786')
示例2: test_mock_options
# 需要导入模块: from FedoraReview import Mock [as 别名]
# 或者: from FedoraReview.Mock import _get_root [as 别名]
def test_mock_options(self):
''' test -o/--mock-options and -m/mock-config '''
nextrelease = '%d' % (int(RELEASE) + 1)
v = nextrelease if RELEASE in self.BUILDROOT else RELEASE
buildroot = 'fedora-%s-i386' % v
self.init_test('mock-options',
argv = ['-n', 'python-test', '--cache'],
options='--resultdir=results --uniqueext=foo',
buildroot=buildroot)
bug = NameBug('python-test')
bug.find_urls()
bug.download_files()
mock_cmd = ' '.join(Mock._mock_cmd())
Mock._get_root()
self.assertIn('-r ' + buildroot, mock_cmd)
self.assertEqual(Mock.mock_root, buildroot + '-foo')