Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

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:
    28
    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...