Commit 3ee42aa7 authored by Roman Yurchak's avatar Roman Yurchak

Use pyodide_build in tests

parent 64ab6761
......@@ -63,6 +63,9 @@ jobs:
ccache -z
make
ccache -s
# install all relevant pyodide_build files to
# the virtualenv that will be persisted
pip install .
- save_cache:
paths:
......
......@@ -223,7 +223,6 @@ def make_parser(parser):
parser.add_argument(
'--target', type=str, nargs='?', default=common.TARGETPYTHON,
help='The path to the target Python installation')
parser.add_argument('basename', type=str, nargs='?')
return parser
......
......@@ -7,7 +7,7 @@ from pathlib import Path
TEST_DIR = (Path(__file__).parent
/ "cpython/build/3.6.4/host/lib/python3.7/test")
/ "cpython/build/3.7.0/host/lib/python3.7/test")
def collect_tests(base_dir):
......
import pytest
import os
from pathlib import Path
import sys
from pyodide_build.common import parse_package
BASE_DIR = Path(__file__).parent.parent
PKG_DIR = BASE_DIR / 'packages'
# TODO: remove once we have a proper Python package for common functions
sys.path.append(str(BASE_DIR / 'tools'))
import common # noqa
def registered_packages():
"""Returns a list of registred package names"""
......@@ -23,7 +19,7 @@ def registered_packages_meta():
for each registed package
"""
packages = registered_packages
return {name: common.parse_package(PKG_DIR / name / 'meta.yaml')
return {name: parse_package(PKG_DIR / name / 'meta.yaml')
for name in packages}
......@@ -34,7 +30,7 @@ UNSUPPORTED_PACKAGES = {'chrome': ['pandas'],
@pytest.mark.parametrize('name', registered_packages())
def test_import(name, selenium_standalone):
# check that we can parse the meta.yaml
meta = common.parse_package(PKG_DIR / name / 'meta.yaml')
meta = parse_package(PKG_DIR / name / 'meta.yaml')
if name in UNSUPPORTED_PACKAGES[selenium_standalone.browser]:
pytest.xfail(
......
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