Commit graph

8 commits

Author SHA1 Message Date
Arthur Noel
0d145c01d5 refactor tests
* factor out duplicated code
* make tests an importable package
* idiomatic pytest usage
* do not touch files outside of the tmp test tree and do not depend on
  external state (except for /nix/store ☹)
* run coverage to root out dead code
2023-11-28 13:10:24 +00:00
Andrew Marshall
92eb25521e Run tests with and without direnv’s strict_env
It seems unlikely that the “without” case will have any errors that the
“with” case doesn’t, but it’s still a common use case and easy enough to
parametrize.
2023-04-14 12:43:34 -04:00
Andrew Marshall
857bcd5c4f Remove unneeded shebangs from test files
The files are not executable, tests should only be run via `pytest`, and
some of them were incorrectly python2.
2023-04-14 12:43:34 -04:00
Jörg Thalheim
471aa92765 sort imports with ruff 2023-01-16 14:09:00 +01:00
Jörg Thalheim
28a0597659 graceful fallback if no nixpkgs is in NIX_PATH 2023-01-16 14:06:09 +01:00
Bryan Bennett
77efe5abca
Fix tests for empty nixfile 2022-12-09 20:20:50 -05:00
Bryan Bennett
0db25e4de9
Don't track $nixfile if it is empty 2022-12-06 15:55:11 -05:00
Jörg Thalheim
d74ad21a58
tests: test arguments passed to use_nix 2022-06-01 08:51:57 +02:00