sajran

joined 1 year ago
[–] sajran@lemmy.ml 4 points 2 months ago

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.ml 5 points 2 months ago

This is great news but I just have to say it: we need Proton Drive on Linux. Still very happy though.

[–] sajran@lemmy.ml 6 points 3 months ago (1 children)

Very interesting experiment. Thanks for sharing! Maybe I'll find some time to run the benchmarks on my Pixel 7 in the upcoming days.

[–] sajran@lemmy.ml 2 points 3 months ago* (last edited 3 months ago)

But... How do you even know you can smell ants? Why did you try it? Or can you smell them from meters away?

[–] sajran@lemmy.ml 3 points 3 months ago

Ente is as close as you can get to Google Photos with E2EE right now. I recently migrated there. The migration wasn't painless and involved some scripting to handle albums and duplicates but the service itself is really good. Can recommend!

[–] sajran@lemmy.ml 1 points 3 months ago (1 children)

I really hope this happens. NFC payments are the only thing that keeps me from switching to GrapheneOS. Seeing how the situation with big tech unfolds, it's not impossible that I will decide to give up this convenience though.

[–] sajran@lemmy.ml 9 points 4 months ago

I absolutely love the videos on this channel, this one being one of the best published yet. I'm literally blown away by the level of detail and clarity. I think I'm going to watch it more one time...

[–] sajran@lemmy.ml 2 points 4 months ago

I'm so excited for Cosmic!

[–] sajran@lemmy.ml 2 points 4 months ago (1 children)

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.)

[–] sajran@lemmy.ml 35 points 4 months ago

You are only starting to think that NOW?

[–] sajran@lemmy.ml 1 points 5 months ago

But Nothing Phone isn't a Pixel, is it? Yeah, I think it's probably closer to the Pixel's clean software experience than Samsung's bloated one, but still, this doesn't seem to be fair comparison.

[–] sajran@lemmy.ml 5 points 5 months ago (2 children)

I used Samsung until about a year ago and now use Pixel since that time. Pixel software experience is infinitely better for my tastes and needs.

view more: next ›