示例#1
0
 def test_executor_explicit_Failed(self):
     ex = RunExecutor(ItemTestFailingExplicit("failex", self.config),
                      config=self.config)
     
     outcome = ex.execute()
     assert not outcome.passed
     assert outcome.excinfo == "3"
示例#2
0
    def test_run_executor(self):
        ex = RunExecutor(ItemTestPassing("pass", self.config), config=self.config)
        outcome = ex.execute()
        assert outcome.passed
    
        ex = RunExecutor(ItemTestFailing("fail", self.config), config=self.config)
        outcome = ex.execute()
        assert not outcome.passed

        ex = RunExecutor(ItemTestSkipping("skip", self.config), config=self.config)
        outcome = ex.execute()
        assert outcome.skipped 
        assert not outcome.passed
        assert not outcome.excinfo
示例#3
0
 def test_run_executor_capture(self):
     ex = RunExecutor(ItemTestPrinting("print", self.config), config=self.config)
     outcome = ex.execute()
     assert outcome.stdout == "hello\n"
示例#4
0
 def test_executor_explicit_Faile_no_excinfo(self):
     ex = RunExecutor(ItemTestFailingExplicitEmpty("failexx", self.config),
                      config=self.config)
     outcome = ex.execute()
     assert not outcome.passed
示例#5
0
def plain_runner(item, session, reporter):
    r = RunExecutor(item, usepdb=session.config.option.usepdb, reporter=reporter, config=session.config)
    outcome = r.execute()
    outcome = ReprOutcome(outcome.make_repr(session.config.option.tbstyle))
    return outcome