def test_verbosity_2(self): stream = StringIO() result = run(suite=mksuite(), testRunner=LodeRunner(stream=stream, verbosity=2)) self.assertEqual("runTest (test_verbosity.TestCase) ... ok", stream.getvalue().split("\n")[0]) self.assertTrue(result)
def test_verbosity_1_config(self): stream = StringIO() result = run(suite=mksuite(), config=Config(verbosity=1, stream=stream, plugins=DefaultPluginManager())) self.assertEqual(".", stream.getvalue().split("\n")[0]) self.assertTrue(result)
def test_discover_dataprovided_test_by_regexp(self): stream = StringIO() result = run(testRunner=LodeRunner(stream=stream), argv=[ "lode_runner", "--dataproviders-first", "-m", "test_with_dataprovider_fixture_2", "tests/data/dataprovided/dataprovided.py"]) self.assertTrue(self.ran_1_test in stream.getvalue(), "\n%s in stream output:\n%s" % (self.ran_1_test, stream.getvalue())) self.assertTrue(result)
def test_discover_dataprovided_test_by_regexp(self): stream = StringIO() result = run(testRunner=LodeRunner(stream=stream), argv=[ "lode_runner", "--dataproviders-first", "-m", "test_with_dataprovider_fixture_2", "tests/data/dataprovided/dataprovided.py" ]) self.assertTrue( self.ran_1_test in stream.getvalue(), "\n%s in stream output:\n%s" % (self.ran_1_test, stream.getvalue())) self.assertTrue(result)
def test_verbosity_1(self): stream = StringIO() result = run(suite=mksuite(), testRunner=LodeRunner(stream=stream, verbosity=1)) self.assertEqual(".", stream.getvalue().split("\n")[0]) self.assertTrue(result)
def test_verbosity_2_config(self): stream = StringIO() result = run(suite=mksuite(), config=Config(verbosity=2, stream=stream, plugins=DefaultPluginManager())) self.assertEqual("runTest (test_verbosity.TestCase) ... ok", stream.getvalue().split("\n")[0]) self.assertTrue(result)
def test_all_teardowns_ran(self): stream = StringIO() run(suite=mksuite(), testRunner=LodeRunner(stream=stream)) self.assertEqual([], teardown_to_run)
def test_run_suite(self): stream = StringIO() result = run(suite=mksuite(), testRunner=LodeRunner(stream=stream)) self.assertTrue(result)