Skip to content

Better test discovery#1981

Merged
phorward merged 5 commits intopyodide:mainfrom
rth:better-test-discovery
Nov 21, 2021
Merged

Better test discovery#1981
phorward merged 5 commits intopyodide:mainfrom
rth:better-test-discovery

Conversation

@rth
Copy link
Copy Markdown
Member

@rth rth commented Nov 20, 2021

This improves the pytest test discovery with the following points,

  • Running pytest with no arguments (or pytest .) now correctly collects all available tests (except for emsdk ones which require the compiler setup and have to be run separately with make -C emsdk test)
  • Running pytest on packages now skips package tests that are not built. This is done at the selenium fixture level and so will also apply to new tests.
  • packages/test_packages_common.py::test_import now will skip the test before loading the selenium_standalone fixture which is slow. Previously it was first loading the slow fixture, and then skipping.
  • removes make test as I think pytest should not be used via make, as then one loses access to all useful flags (e.g. --pdb, -n auto (for parallelism), -s for printing stdout, etc)

Closes #1979

Copy link
Copy Markdown
Member

@phorward phorward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @rth thanks for cleaning this up! I'm fine with this PR, lets wait for CircleCI to complete.

@phorward phorward merged commit 7f307af into pyodide:main Nov 21, 2021
@rth rth deleted the better-test-discovery branch November 23, 2021 09:24
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.

make test in docker always fails due broken emsdk/tests

2 participants