diff --git a/.circleci/config.yml b/.circleci/config.yml index 8d89c5dcc..ba5a45797 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -69,6 +69,17 @@ jobs: command: | pytest test -v -k chrome + test-python: + <<: *defaults + steps: + - checkout + - attach_workspace: + at: . + - run: + name: test + command: | + pytest test -v -k 'not (chrome or firefox)' + benchmark: <<: *defaults steps: @@ -106,6 +117,7 @@ workflows: - test-firefox: requires: - build + - test-python - benchmark: requires: - build @@ -113,6 +125,7 @@ workflows: requires: - test-chrome - test-firefox + - test-python filters: branches: only: master diff --git a/test/test_numpy.py b/test/packages/test_numpy.py similarity index 100% rename from test/test_numpy.py rename to test/packages/test_numpy.py diff --git a/test/test_pandas.py b/test/packages/test_pandas.py similarity index 100% rename from test/test_pandas.py rename to test/packages/test_pandas.py diff --git a/test/src/test_pyodide.py b/test/src/test_pyodide.py new file mode 100644 index 000000000..fdd1a999c --- /dev/null +++ b/test/src/test_pyodide.py @@ -0,0 +1,17 @@ +import sys +from pathlib import Path +from textwrap import dedent + +sys.path.append(str(Path(__file__).parents[2] / 'src')) + +from pyodide import find_imports # noqa: E402 + + +def test_find_imports(): + + res = find_imports(dedent(""" + import six + import numpy as np + from scipy import sparse + """)) + assert set(res) == {'numpy', 'scipy', 'six'}