Commit Graph

28 Commits

Author SHA1 Message Date
Gyeongjae Choi 9d874d588b
MAINT Update pre-commit config (#2890) 2022-07-19 16:43:12 +01:00
Jo Bovy 8642b09449
Add astropy tests (#2865)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Gyeongjae Choi <def6488@gmail.com>
2022-07-13 11:19:29 +09:00
Gyeongjae Choi 7d7b7e899d
TST Make `pyodide-test-runner` installable (#2742) 2022-07-04 09:07:01 +02:00
Hood Chatham 516364e468
Move more functions into submodules of pyodide (#2790)
This resolves #2689.
2022-06-28 06:31:58 -07:00
Hood Chatham 761b6320ba
Move eval functions to pyodide.code submodule (#2787)
This raises a deprecation warning the first time such a function is used. Work towards #2689.
2022-06-25 21:20:22 -07:00
Hood Chatham 23c5587cfb
ENH Add micropip support for loading wheels from emfs (#2767) 2022-06-23 11:59:47 -07:00
Hood Chatham 1624e4a624
Fix micropip package loading from file:// in node (#2759)
The node native fetch doesn't support file:// yet and nor does node-fetch but we
want micropip to support it anyways.
2022-06-22 11:10:51 -07:00
Roman Yurchak 8de2a04ab0
API Rename packages.json to repodata.json (#2749)
Closes #2747

 * renames packages.json to repodata.json
 * renames the corresponding JS and Python variables to be a bit more explicit.

Tangentially related to #795
2022-06-20 14:46:11 -07:00
Hood Chatham 885d7ff7cc
Fix hypothesis exceptiongroup test failure (#2718) 2022-06-15 15:55:36 -07:00
Hood Chatham 70133410d8
Fix run_in_pyodide to return values and update tests (#2653) 2022-05-31 13:58:33 +02:00
Gyeongjae Choi 74a89826ce
TST Add Playwright for an auxiliary testing framework (#2091) 2022-05-31 08:17:47 +09:00
Hood Chatham 8ab07acadd
ENH Add support for pickling JsException (#2631) 2022-05-29 18:31:49 -07:00
Hood Chatham f3c844514e
MAINT Use new run_in_pyodide features for some type conversions tests (#2632)
This should improve the tests by quite a lot:

  *  assertions get formatted automatically
  *  many fewer doubly / triply nested eval strings
  *  IDE support for code formatting, syntax highlighting 
     (the IDEs are pretty confused about other stuff but still...)

Also, messing around with these type conversions tests is a
good way to find lots of bugs, cf my other PRs from 2022-05-27.
2022-05-28 21:18:08 -07:00
Hood Chatham d818f410c4
Use tblib to pickle errors in `run_in_pyodide` (#2619) 2022-05-27 12:28:46 -07:00
Hood Chatham ce3c90339c
MAINT `run_in_pyodide` fallback to not using pytest if it's not available (#2622) 2022-05-26 18:15:27 -07:00
Hood Chatham 45ee8ee62c
Add support for inner run_in_pyodide functions (#2618) 2022-05-26 14:27:07 -07:00
Hood Chatham cb65f45f12
MAINT Remove `driver_timeout` argument from `run_in_pyodide` in favor of `pytest.mark.driver_timeout` (#2615) 2022-05-26 14:26:24 -07:00
Hood Chatham 36dee13657
MAINT run_in_pyodide function should take selenium fixture as an explicit argument (#2617)
This updates run_in_pyodide to assume that the first argument of the function will be a selenium fixture.
2022-05-25 19:47:43 -07:00
Hood Chatham 0bc8d975b4 Forgot to remove this print statement 2022-05-25 16:18:42 -07:00
Hood Chatham 1eab80ea40
MAINT Add pytest.mark.xfail_browsers and use it to reduce boilerplate (#2616)
Use a decorator to indicate which browsers we want to xfail test. 
This works for `run_in_pyodide` as well as normal tests.
2022-05-25 13:34:40 -07:00
Hood Chatham 8ed430d300
Allow using other decorators with `@run_in_pyodide` (#2541)
Allow using `pytest.mark.xfail`, `pytest.mark.parametrize`, hypothesis,
and other decorators in `run_in_pyodide` tests
2022-05-25 10:31:26 -07:00
Hood Chatham 088d6716b8
MAINT Refactor run_in_pyodide (#2606) 2022-05-24 13:34:28 -07:00
Hood Chatham 59d8ab241d
MAINT split test_testing into three files (#2601) 2022-05-23 19:45:25 -07:00
echorand (Amit Saha) b0f7feb210
ENH Verifying checksum when loading packages in browser (#2513)
This PR does the following to complete #2431:

    * Calculate the Subresource integrity hash from the sha256 as explained here:
    https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
    As the document explains, it is a base64 encoded string of the "binary" hash, 
    not the data returned by hexdigest() method.
    * Implement the verification of the checksum when loading packages

This ignores the verification for NodeJS environment as the node-fetch module
doesn't support the integrity option. Node 17.5.0 has added the fetch API as
experimental, it would be prudent to come back and fix this when we are ready
to use that version.
2022-05-16 13:41:01 -07:00
Lester Fan 0fbbeb319e
Add browser API wrappers (#2456)
Adds Python wrappers for setTimeout, clearTimeout, setInterval, clearInterval, 
addEventListener and removeEventListener as described in #2430.
2022-05-12 20:10:10 -07:00
Gyeongjae Choi 8cfd9911af
ENH Add `pre` option in micropip.install (#2542) 2022-05-11 21:35:06 -06:00
Hood Chatham ecaab15c12
Pytest rewrites for run_in_pyodide (#2510) 2022-05-08 18:43:26 -07:00
Gyeongjae Choi b20b43bd66
MAINT Split conftest.py into modules (#2418) 2022-05-08 16:52:08 +09:00