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 Files generated by test without cleanup.

Discussion in 'Testing & Automation' started by SunSailor, Feb 7, 2023.

  1. SunSailor

    SunSailor

    Joined:
    Aug 22, 2012
    Posts:
    21
    Hi,
    I'm having an issue, where testing an editor internal workflow for assets. I create an asset, perform an copy on that (both using the AssetDatabase calls) and assert for some statuses within the copy. So far, so good.
    Now, each time I run the test I get the warning "Files generated by test without cleanup." and a list of the created files, although they are wiped with the corresponding directory in TearDown. I tried the following things:
    * Running SetUp and TearDown in their Unity versions with yielding after the deletion
    * Running the test as UnityTest with yielding after each operation
    * Deleting the directory in the test itself instead of TearDown
    In any case I get the message, although everytime the directory is removed for good.

    upload_2023-2-7_9-24-11.png

    Another thing I encounter is, as this test is part of a custom package, it opens an error window, stating, that a move operation can't be done, because the target directory can't be found. This occurs not with the test itself, but with the next test running - where the target directory isn't available by design.

    upload_2023-2-7_9-23-42.png

    Are these expected behaviours? Seems like a bug to me at the moment. How can I work around these issues, I ran out of ideas...