Repository navigation
Closed
Description
The test* targets of the Makefile (make tests) build real environments, but CI doesn't run them, and only some of them have a pytest counterpart. On master (0c67226):
| Target | What it runs | pytest counterpart |
|---|---|---|
test1 |
nodeenv -j 4 nodeenv |
test_smoke (-j has no effect with the default --prebuilt) |
test2 |
nodeenv -j 4 -p in a virtualenv |
none, only unit tests with install_node mocked (test_create_environment_*) |
test3 |
nodeenv -p in a virtualenv |
none, same as test2 |
test4 |
nodeenv -p --node=system in a python3.9 virtualenv |
partly: test_smoke_n_system_special_chars runs -n system, but in a separate environment, not with -p |
test5 |
nodeenv -p --prebuilt in a python2.7 virtualenv (not part of make tests) |
none |
test7 |
nodeenv -j 4 -p --prebuilt, npm install -g sitemap, then freeze lists one package |
partly: test_freeze_* in tests/test_activate_shells.py run freeze against a stub npm |
test8 |
nodeenv -j 4 --prebuilt env in a directory named öäü (#49) |
none |
test9 |
nodeenv -j 4 --prebuilt env in a directory named test dir (#187) |
partly: test_smoke_n_system_special_chars has spaces in the path, but uses -n system, not --prebuilt |
test10 |
nodeenv -j 4 -p --prebuilt twice (#189) |
none |
Two of the targets no longer test what they describe:
test7compares the output ofwc -lwith" 1", which is how BSDwcpads it. GNUwcprints1, so the target fails on Linux.- In
test10the second run finds the same node version already installed and skipsinstall_node(create_environment), so it never reaches the Symlink to env/bbin/npm fails if npm already exists #189 branch ofcopytree.copytreehas no unit test either.
test4 and test5 also pin python3.9 and python2.7, which the CI matrix (3.10-3.14) doesn't include (see #436).
Proposal
Move these cases to pytest as integration tests, which the integration job in .github/workflows/tests.yml already runs, and remove the test* targets and tests from the Makefile once they are covered.
Metadata
Metadata
Assignees
Labels
No labels
Activity
chore(tests): port the Makefile test targets to pytest (ekalinin#445)