sajran

joined 2 years ago
2
submitted 9 months ago* (last edited 9 months ago) by sajran@lemmy.ml to c/unixporn@lemmy.ml
 

This setup is a result of months of learning about NixOS and tinkering. There is always something more to polish but I'm at a point where I'm actually satisfied.

Screenshot of desktop with floating terminal window and sway notification center

Screenshot of desktop with tiled firefox and terminal emulator running btop windows

[–] sajran@lemmy.ml 4 points 1 year 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 1 year 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 1 year 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 1 year ago* (last edited 1 year 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 1 year 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 1 year 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 1 year 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 1 year ago

I'm so excited for Cosmic!

[–] sajran@lemmy.ml 2 points 1 year 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 1 year ago

You are only starting to think that NOW?

[–] sajran@lemmy.ml 1 points 1 year 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 1 year 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 ›