Example #1
0
 def test_exitfirst(self):
     """
     If trial was passed the C{--exitfirst} option, the constructed test
     result object is wrapped with L{reporter._ExitWrapper}.
     """
     self.parseOptions(["--exitfirst"])
     runner = self.getRunner()
     result = runner._makeResult()
     self.assertIsInstance(result, reporter._ExitWrapper)
Example #2
0
 def test_exitfirst(self):
     """
     If trial was passed the C{--exitfirst} option, the constructed test
     result object is wrapped with L{reporter._ExitWrapper}.
     """
     self.parseOptions(["--exitfirst"])
     runner = self.getRunner()
     result = runner._makeResult()
     self.assertIsInstance(result, reporter._ExitWrapper)
 def test_getsUncleanWarnings(self):
     """
     Specifying '--unclean-warnings' on the trial command line will cause
     reporters to be wrapped in a device which converts unclean errors to
     warnings.  See L{test_reporter.TestDirtyReactor} for implications.
     """
     self.parseOptions(["--unclean-warnings"])
     runner = self.getRunner()
     self.assertIsInstance(runner._makeResult(), reporter.UncleanWarningsReporterWrapper)
 def test_uncleanWarningsOffByDefault(self):
     """
     By default Trial sets the 'uncleanWarnings' option on the runner to
     False. This means that dirty reactor errors will be reported as
     errors. See L{test_reporter.TestDirtyReactor}.
     """
     self.parseOptions([])
     runner = self.getRunner()
     self.assertNotIsInstance(runner._makeResult(), reporter.UncleanWarningsReporterWrapper)
Example #5
0
 def test_getsUncleanWarnings(self):
     """
     Specifying '--unclean-warnings' on the trial command line will cause
     reporters to be wrapped in a device which converts unclean errors to
     warnings.  See L{test_reporter.TestDirtyReactor} for implications.
     """
     self.parseOptions(['--unclean-warnings'])
     runner = self.getRunner()
     self.assertIsInstance(runner._makeResult(),
                           reporter.UncleanWarningsReporterWrapper)
Example #6
0
 def test_uncleanWarningsOffByDefault(self):
     """
     By default Trial sets the 'uncleanWarnings' option on the runner to
     False. This means that dirty reactor errors will be reported as
     errors. See L{test_reporter.TestDirtyReactor}.
     """
     self.parseOptions([])
     runner = self.getRunner()
     self.assertNotIsInstance(runner._makeResult(),
                              reporter.UncleanWarningsReporterWrapper)
Example #7
0
 def test_runner_get_result(self):
     self.parseOptions([])
     runner = self.getRunner()
     result = runner._makeResult()
     self.assertEqual(result.__class__, self.config['reporter'])
Example #8
0
 def test_runner_get_result(self):
     self.parseOptions([])
     runner = self.getRunner()
     result = runner._makeResult()
     self.assertEqual(result.__class__, self.config['reporter'])
Example #9
0
 def test_runner_can_get_reporter(self):
     self.parseOptions([])
     result = self.config["reporter"]
     runner = self.getRunner()
     self.assertEqual(result, runner._makeResult().__class__)
 def test_runner_can_get_reporter(self):
     self.parseOptions([])
     result = self.config["reporter"]
     runner = self.getRunner()
     self.assertEqual(result, runner._makeResult().__class__)