• 0 Posts
  • 45 Comments
Joined 1 year ago
cake
Cake day: June 21st, 2023

help-circle
  • Since you have all your shutil.copytrees and sys.path manipulation at the top level of the test modules, they are executed the moment those modules are imported. unittest likely imports all discovered test modules before actually executing the tests so the set up of both modules is executed in random order before the tests are run. The correct way to perform test setup is using setUp and setUpClass methods of unittest.TestCase. Their counterparts tearDown and tearDownClass are used to clean up after tests. You probably will be able to get this to work somehow using those methods.

    However, I’m fairly certain that this entire question is an example of the XY problem and you should be approaching this whole thing differently. Copying the modules and their mock dependencies into a temporary directory and manipulating sys.path seems like an absolute nightmare and it will be a massive PITA even if you get it to a working state. I don’t know what problem exactly you’re trying to solve but I think you should really read up on unittest.mock and even more importantly on dependency injection.









  • sajran@lemmy.mltoAutism@lemmy.worldSocializing
    link
    fedilink
    English
    arrow-up
    2
    ·
    6 months ago

    So, your original comment sounded very relatable and I never heard about an AQ test before. Just took one and got 34. Well…

    (For the unfamiliar: 34 out of 50, over 32 means you should probably go and get a real diagnosis.)









  • I’m pretty sure I have aphantasia. My mom, on the other hand, is an artist with very powerful imagination. She would often tell me how she sees something she’s imagining and I never really knew what she meant. I just assumed that it’s kinda a figure of speech. Only when I first read about aphantasia I realized that it probably really works completely differently for her.

    I would like to know whether aphantasia has any practical impact on one’s life. For example, I had this suspicion that differences in my “mental image processing pipeline” might be a factor in my terrible driving skills. Quick visual assessment of the traffic situation, at an intersection for instance, is very hard for me. This is just me making stuff up though, no idea if it makes any sense. In fact, I think I’m going to research this topic and look for some papers now!