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


Python UI.here方法代碼示例

本文整理匯總了Python中testrepository.ui.model.UI.here方法的典型用法代碼示例。如果您正苦於以下問題:Python UI.here方法的具體用法?Python UI.here怎麽用?Python UI.here使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在testrepository.ui.model.UI的用法示例。


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

示例1: get_test_ui_and_cmd2

# 需要導入模塊: from testrepository.ui.model import UI [as 別名]
# 或者: from testrepository.ui.model.UI import here [as 別名]
 def get_test_ui_and_cmd2(self, options=(), args=()):
     self.dirty()
     ui = UI(options=options, args=args)
     ui.here = self.tempdir
     cmd = run.run(ui)
     ui.set_command(cmd)
     return ui, cmd
開發者ID:testing-cabal,項目名稱:testrepository,代碼行數:9,代碼來源:test_testcommand.py

示例2: get_test_ui_and_cmd

# 需要導入模塊: from testrepository.ui.model import UI [as 別名]
# 或者: from testrepository.ui.model.UI import here [as 別名]
 def get_test_ui_and_cmd(self, options=(), args=(), proc_outputs=(),
     proc_results=()):
     self.dirty()
     ui = UI(options=options, args=args, proc_outputs=proc_outputs,
         proc_results=proc_results)
     ui.here = self.tempdir
     cmd = run.run(ui)
     ui.set_command(cmd)
     return ui, cmd
開發者ID:dstanek,項目名稱:testrepository,代碼行數:11,代碼來源:test_run.py

示例3: test_TestCommand_get_run_command_outside_setUp_fails

# 需要導入模塊: from testrepository.ui.model import UI [as 別名]
# 或者: from testrepository.ui.model.UI import here [as 別名]
 def test_TestCommand_get_run_command_outside_setUp_fails(self):
     self.dirty()
     ui = UI()
     ui.here = self.tempdir
     command = TestCommand(ui, None)
     self.set_config('[DEFAULT]\ntest_command=foo\n')
     self.assertThat(command.get_run_command, raises(TypeError))
     command.setUp()
     command.cleanUp()
     self.assertThat(command.get_run_command, raises(TypeError))
開發者ID:testing-cabal,項目名稱:testrepository,代碼行數:12,代碼來源:test_testcommand.py

示例4: test_list_tests_requests_concurrency_instances

# 需要導入模塊: from testrepository.ui.model import UI [as 別名]
# 或者: from testrepository.ui.model.UI import here [as 別名]
 def test_list_tests_requests_concurrency_instances(self):
     # testr list-tests is non-parallel, so needs 1 instance.
     # testr run triggering list-tests will want to run parallel on all, so
     # avoid latency by asking for whatever concurrency is up front.
     # This covers the case for non-listing runs as well, as the code path
     # is common.
     self.dirty()
     ui = UI(options= [('concurrency', 2), ('parallel', True)])
     ui.here = self.tempdir
     cmd = run.run(ui)
     ui.set_command(cmd)
     ui.proc_outputs = [_b('returned\ninstances\n')]
     command = self.useFixture(TestCommand(ui, None))
     self.set_config(
         '[DEFAULT]\ntest_command=foo $LISTOPT $IDLIST\ntest_id_list_default=whoo yea\n'
         'test_list_option=--list\n'
         'instance_provision=provision -c $INSTANCE_COUNT\n'
         'instance_execute=quux $INSTANCE_ID -- $COMMAND\n')
     fixture = self.useFixture(command.get_run_command(test_ids=['1']))
     fixture.list_tests()
     self.assertEqual(set([_b('returned'), _b('instances')]), command._instances)
     self.assertEqual(set([]), command._allocated_instances)
     self.assertThat(ui.outputs, MatchesAny(Equals([
         ('values', [('running', 'provision -c 2')]),
         ('popen', ('provision -c 2',), {'shell': True, 'stdout': -1}),
         ('communicate',),
         ('values', [('running', 'quux instances -- foo --list whoo yea')]),
         ('popen',('quux instances -- foo --list whoo yea',),
          {'shell': True, 'stdin': -1, 'stdout': -1}),
         ('communicate',)]), Equals([
         ('values', [('running', 'provision -c 2')]),
         ('popen', ('provision -c 2',), {'shell': True, 'stdout': -1}),
         ('communicate',),
         ('values', [('running', 'quux returned -- foo --list whoo yea')]),
         ('popen',('quux returned -- foo --list whoo yea',),
          {'shell': True, 'stdin': -1, 'stdout': -1}),
         ('communicate',)])))
開發者ID:testing-cabal,項目名稱:testrepository,代碼行數:39,代碼來源:test_testcommand.py

示例5: test_TestCommand_is_a_fixture

# 需要導入模塊: from testrepository.ui.model import UI [as 別名]
# 或者: from testrepository.ui.model.UI import here [as 別名]
 def test_TestCommand_is_a_fixture(self):
     ui = UI()
     ui.here = self.tempdir
     command = TestCommand(ui, None)
     command.setUp()
     command.cleanUp()
開發者ID:testing-cabal,項目名稱:testrepository,代碼行數:8,代碼來源:test_testcommand.py

示例6: test_takes_ui

# 需要導入模塊: from testrepository.ui.model import UI [as 別名]
# 或者: from testrepository.ui.model.UI import here [as 別名]
 def test_takes_ui(self):
     ui = UI()
     ui.here = self.tempdir
     command = TestCommand(ui, None)
     self.assertEqual(command.ui, ui)
開發者ID:testing-cabal,項目名稱:testrepository,代碼行數:7,代碼來源:test_testcommand.py

示例7: get_test_ui_and_cmd

# 需要導入模塊: from testrepository.ui.model import UI [as 別名]
# 或者: from testrepository.ui.model.UI import here [as 別名]
 def get_test_ui_and_cmd(self, options=(), args=(), repository=None):
     self.dirty()
     ui = UI(options=options, args=args)
     ui.here = self.tempdir
     return ui, self.useFixture(TestCommand(ui, repository))
開發者ID:testing-cabal,項目名稱:testrepository,代碼行數:7,代碼來源:test_testcommand.py


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