Skip to content

Commit

Permalink
TST Fix jsexception test (pyodide#3202)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanking13 authored Oct 25, 2022
1 parent 8093089 commit 25a341a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
15 changes: 6 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
name: Test docs
command: |
mkdir test-results
pip install pytest-pyodide
pip install -r requirements.txt
pip install -e ./pyodide-build
npm install -g node-fetch@2
pytest docs/sphinx_pyodide/tests --junitxml=test-results/junit.xml
Expand Down Expand Up @@ -269,9 +269,8 @@ jobs:
command: |
make npm-link
mkdir test-results
pip install pytest-pyodide
pip install -r requirements.txt
pip install -e pyodide-build
pip install -e ./pyodide-build
npm install -g node-fetch@2
if [ -z "<< parameters.cache-dir >>" ]; then
export CACHE_DIR=".test_cache/.pytest_cache_$(echo $RANDOM | md5sum | head -c 10)"
Expand Down Expand Up @@ -323,15 +322,13 @@ jobs:
conda create -n pyodide python=3.10 -y
source activate pyodide
python -m pip install -r requirements.txt
python -m pip install pytest-pyodide
pip install -e ./pyodide-build
- run:
name: test safari
command: |
export PATH="$HOME/miniforge3/bin:$PATH"
source activate pyodide
mkdir test-results
pip install pytest-pyodide
pip install -e ./pyodide-build
if [ -z "<< parameters.cache-dir >>" ]; then
export CACHE_DIR=".test_cache/.pytest_cache_$(echo $RANDOM | md5sum | head -c 10)"
else
Expand All @@ -356,7 +353,7 @@ jobs:
name: stack-size
command: |
make npm-link
pip install pytest-pyodide
pip install -r requirements.txt
npm install -g node-fetch@2
pytest -s benchmark/stack_usage.py | sed -n 's/## //pg'
Expand Down Expand Up @@ -430,11 +427,11 @@ jobs:
name: install requirements
command: |
pip3 install numpy matplotlib pandas
pip install -r requirements.txt
npm install -g node-fetch@2
- run:
name: benchmark
command: |
pip install pytest-pyodide
npm install -g node-fetch@2
python benchmark/benchmark.py all --output dist/benchmarks.json
- store_artifacts:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ jobs:
shell: bash -l {0}
run: |
pip install -r requirements.txt
cd pyodide-build && pip install -e ".[test]" && cd ..
pip install -e ./pyodide-build
# FIXME: playwright 1.23.0 has unknown performance issue on firefox
pip install "playwright<1.23.0" && python -m playwright install
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
pytest-cov
pytest-httpserver
pytest-benchmark
pytest-pyodide==0.23.0
2 changes: 1 addition & 1 deletion src/tests/test_pyodide.py
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,7 @@ def test_pickle_jsexception(selenium):


def test_raises_jsexception(selenium):
from pyodide.ffi import JsException
from pytest_pyodide.pyodide import JsException

@run_in_pyodide
def raise_jsexception(selenium):
Expand Down

0 comments on commit 25a341a

Please sign in to comment.