public void RunSetupAndTeardowns() { MyPythonSuite suite = new MyPythonSuite(); suite.Setup(); PythonFixtureBuilder builder = new PythonFixtureBuilder(suite.Engine); PythonFixture fixture = builder.BuildFixtures()[0]; fixture.FixtureSetup(); fixture.Setup(); fixture.Teardown(); fixture.FixtureTeardown(); }
public override void DoFixtureSetUp(TestResult suiteResult) { try { _fixture.FixtureSetup(); Status = SetUpState.SetUpComplete; } catch (Exception ex) { if (ex is NunitException || ex is TargetInvocationException) { ex = ex.InnerException; } if (testFramework.IsIgnoreException(ex)) { ShouldRun = false; suiteResult.NotRun(ex.Message); suiteResult.StackTrace = ex.StackTrace; IgnoreReason = ex.Message; } else { suiteResult.Failure(ex.Message, ex.StackTrace); Status = SetUpState.SetUpFailed; } } finally { if (testFramework != null) { suiteResult.AssertCount = testFramework.GetAssertCount(); } } }