Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Basthon
Basthon Kernel
Commits
a46c17d8
Commit
a46c17d8
authored
Jan 31, 2021
by
Romain Casati
Browse files
Testing numpy import.
parent
1988f90f
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test_base.py
View file @
a46c17d8
...
...
@@ -78,3 +78,11 @@ def test_importables(selenium):
with
open
(
Path
(
__file__
).
parent
/
"data"
/
"importables.json"
)
as
f
:
target
=
json
.
load
(
f
)
assert
importables
==
target
def
test_import_not_hacked
(
selenium
):
data
=
selenium
.
run_basthon
(
"import numpy as np; np.pi"
)
assert
data
[
'result'
][
'result'
][
'text/plain'
]
==
"3.141592653589793"
# 0.16.1 shows numpy's warnings (Python 3.8)
if
selenium
.
run_js
(
"return pyodide.version()"
)
!=
"0.16.1"
:
assert
data
[
'stderr'
]
==
""
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment