Skip to content

Move the Makefile test targets to pytest #444

Closed

Description

@ekalinin

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:

  • test7 compares the output of wc -l with " 1", which is how BSD wc pads it. GNU wc prints 1, so the target fails on Linux.
  • In test10 the second run finds the same node version already installed and skips install_node (create_environment), so it never reaches the Symlink to env/bbin/npm fails if npm already exists #189 branch of copytree. copytree has 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.

Activity

  1. added a commit that references this issue on Oct 25, 2026
    eb7c627
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions