Skip to content

Commit

Permalink
MAINT Move package tests under packages/ dir (#471)
Browse files Browse the repository at this point in the history
* Move package tests under the packages/ folder

* Fix tests
  • Loading branch information
rth authored and mdboom committed Jun 19, 2019
1 parent 6898c87 commit 2cf8639
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Expand Up @@ -56,7 +56,7 @@ jobs:
- run:
name: test
command: |
pytest test pyodide_build -v -k firefox
pytest test packages pyodide_build -v -k firefox
test-chrome:
<<: *defaults
Expand All @@ -67,7 +67,7 @@ jobs:
- run:
name: test
command: |
pytest test pyodide_build -v -k chrome
pytest test packages pyodide_build -v -k chrome
test-python:
<<: *defaults
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -111,7 +111,7 @@ build/webworker_dev.js: src/webworker.js
sed -i -e "s#pyodide.js#pyodide_dev.js#g" $@

test: all
pytest test/ -v
pytest test packages pyodide_build -v


lint:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -71,7 +71,7 @@ Install [geckodriver](https://github.com/mozilla/geckodriver/releases) and
[chromedriver](https://sites.google.com/a/chromium.org/chromedriver/downloads) somewhere
on your `PATH`.

`pytest test/`
`pytest test/ packages/`

# Manual Testing

Expand Down
7 changes: 4 additions & 3 deletions test/conftest.py → conftest.py
Expand Up @@ -13,10 +13,11 @@
import sys
import shutil

TEST_PATH = pathlib.Path(__file__).parents[0].resolve()
BUILD_PATH = TEST_PATH / '..' / 'build'
ROOT_PATH = pathlib.Path(__file__).parents[0].resolve()
TEST_PATH = ROOT_PATH / "test"
BUILD_PATH = ROOT_PATH / 'build'

sys.path.append(str(TEST_PATH / '..'))
sys.path.append(str(ROOT_PATH))

from pyodide_build._fixes import _selenium_is_connectable # noqa: E402
import selenium.webdriver.common.utils # noqa: E402
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions test/packages/test_scipy.py → packages/scipy/test_scipy.py
Expand Up @@ -29,3 +29,9 @@ def test_scipy_linalg(selenium_standalone, request):
""")

selenium.run(cmd)


def test_brentq(selenium_standalone):
selenium_standalone.load_package("scipy")
selenium_standalone.run("from scipy.optimize import brentq")
selenium_standalone.run("brentq(lambda x: x, -1, 1)")
2 changes: 2 additions & 0 deletions pytest.ini
@@ -0,0 +1,2 @@
[pytest]
norecursedirs = build src cpython emsdk/
4 changes: 0 additions & 4 deletions test/test_scipy.py

This file was deleted.

0 comments on commit 2cf8639

Please sign in to comment.