Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug Exception when calling LogAssert.ignoreFailingMessages from teardown method

Discussion in 'Testing & Automation' started by liortal, Nov 10, 2020.

  1. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,532
    In my test fixture, i have this method which causes an exception (Unity 2019.4.13):
    Code (CSharp):
    1. [OneTimeTearDown]
    2. public void DisposeTest()
    3. {
    4.     LogAssert.ignoreFailingMessages = false;
    5. }
    This code seems to cause an exception:
    Is this a known bug ?
     
  2. Warnecke

    Warnecke

    Unity Technologies

    Joined:
    Nov 28, 2017
    Posts:
    78
    Thanks for mentioning it. It is not a known bug. I have added a fix for it, which should land in either 1.1.19 or 1.1.20 of the test framework package.
     
  3. lerpenbe

    lerpenbe

    Joined:
    Apr 27, 2018
    Posts:
    4
    This is still a problem with Unity 2021.1.16f and "com.unity.test-framework": "1.1.31".
    Setting
    LogAssert.ignoreFailingMessages = false;
    at the end of the test doesn't help either, then the TearDown still fails when it sees an error.