Use pyodide_build in tests

This commit is contained in:
Roman Yurchak 2018-09-20 19:37:32 +02:00
parent 64ab676171
commit 3ee42aa779
4 changed files with 7 additions and 9 deletions

View File

@ -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:

View File

@ -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

View File

@ -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):

View File

@ -1,15 +1,11 @@
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(