Specifically, the blog post is about debugging the test script like a normal Python program: the standard method to run the test interactively is somewhat clunkier.
Anyway, It's a very niche and technical article about NixOS, I wonder why it was at the top of HN for hours with only 3 bot comments.
> Is this only about Python applications or general?
It has nothing to do with Python, it just happens to use it (previously it was written in Perl). The NixOS test framework is a way to test NixOS configurations: it uses a Qemu VM to run NixOS and a Python script to perform actions (check that a file exists, run a command that should succeed, take a screenshot, etc.).
It's basically an integration test suite for an OS. It's pretty great, if you ask me: you control the entire machine from the boot loader to the desktop environment. You can even network several machines together and test client/server or p2p scenarios.
> How does this compare to testing / debugging flows on Debian, Alpine, CentOS?
I have no idea, but I would be surprised if they have something this sophisticated. Here's some cool ones:
When you're adding some module code to NixOS, you should write a test with this.
More generally, if you're building some complex system with many interacting parts and you want to test it extensively, this is a good way.
Concrete Questions:
- Is this about the official test suite, or general testing with Nix?
- Is this only about Python applications or general?
- How does this compare to testing / debugging flows on Debian, Alpine, CentOS?
- When would I care about this?