Commit 00db2a4b authored by Roman Yurchak's avatar Roman Yurchak

Ability to run pure python tests

parent ccd852c2
...@@ -69,6 +69,17 @@ jobs: ...@@ -69,6 +69,17 @@ jobs:
command: | command: |
pytest test -v -k chrome 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: benchmark:
<<: *defaults <<: *defaults
steps: steps:
...@@ -106,6 +117,7 @@ workflows: ...@@ -106,6 +117,7 @@ workflows:
- test-firefox: - test-firefox:
requires: requires:
- build - build
- test-python
- benchmark: - benchmark:
requires: requires:
- build - build
...@@ -113,6 +125,7 @@ workflows: ...@@ -113,6 +125,7 @@ workflows:
requires: requires:
- test-chrome - test-chrome
- test-firefox - test-firefox
- test-python
filters: filters:
branches: branches:
only: master only: master
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'}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment