Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@FatBoyXPC
Copy link
Collaborator

Nix shells are neat, thanks @jfly!

We stole a page from mycli on how to run this entry point / script without having to pip install it.

Due to this, we just happened to notice a latent bug with this version variable because we only get a version when it's installed.

Nix shells are neat, thanks @jfly!

We stole a page from mycli on how to run this entry point / script
without having to pip install it.

Due to this, we just happened to notice a latent bug with this __version__
variable because we only get a version when it's installed.
Our nix build of shtuff was failing because it ran shtuff in a sandbox
that didn't have shtuff installed. We used to pip install it in the
Makefile but we opted out of doing that as it's unnecessary for Nix :)

Due to getting rid of the venv, we needed to invoke shtuff a bit
differently in the tests. That led to some interesting behavior.

As we no longer have access to `shtuff` (as it's not pip installed),
this meant the recursive `shtuff as` no longer works. Fixing this means
we no longer get two prompts (yay positive side effect!) which explains
the removal of the duplicate prompt assertion from some tests.

While we were debugging this, we made a few tests improvements. One of
these was moving from os.system() to subprocess.run() as os.system()
ignores the exit code, which made the test wait to timeout when looking
for output, as opposed to failing the test immediately.

We also moved from capture_output (which captures both stdout _and_
stderr) to only capturing stdout, which allows us to see the stderr when
debugging test failures.
@FatBoyXPC FatBoyXPC merged commit 986bef2 into jfly:main Oct 31, 2024
@FatBoyXPC FatBoyXPC deleted the add-nix-devshell branch October 31, 2024 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants