Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pyodide
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
pyodide
Commits
defc24c4
Commit
defc24c4
authored
Nov 06, 2018
by
Roman Yurchak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lint
parent
79ba41b4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
benchmark/benchmark.py
benchmark/benchmark.py
+1
-1
test/conftest.py
test/conftest.py
+3
-3
test/test_python.py
test/test_python.py
+2
-2
No files found.
benchmark/benchmark.py
View file @
defc24c4
...
...
@@ -68,7 +68,7 @@ def parse_numpy_benchmark(filename):
lines
=
[]
with
open
(
filename
)
as
fp
:
for
line
in
fp
:
m
=
re
.
match
(
'^#
\
s*(se
t
up|run): (.*)$'
,
line
)
m
=
re
.
match
(
r
'^#\
s*(se
tup|run): (.*)$'
,
line
)
if
m
:
line
=
'{} = {!r}
\
n
'
.
format
(
m
.
group
(
1
),
m
.
group
(
2
))
lines
.
append
(
line
)
...
...
test/conftest.py
View file @
defc24c4
...
...
@@ -84,7 +84,7 @@ class SeleniumWrapper:
driver
.
get
(
f'http://
{
server_hostname
}
:
{
server_port
}
/test.html'
)
try
:
wait
.
until
(
PyodideInited
())
except
TimeoutException
as
exc
:
except
TimeoutException
:
_display_driver_logs
(
self
.
browser
,
driver
)
raise
TimeoutException
()
self
.
wait
=
wait
...
...
@@ -126,7 +126,7 @@ class SeleniumWrapper:
)
try
:
self
.
wait
.
until
(
PackageLoaded
())
except
TimeoutException
as
exc
:
except
TimeoutException
:
_display_driver_logs
(
self
.
browser
,
self
.
driver
)
print
(
self
.
logs
)
raise
TimeoutException
(
'runPythonAsync timed out'
)
...
...
@@ -163,7 +163,7 @@ class SeleniumWrapper:
__tracebackhide__
=
True
try
:
self
.
wait
.
until
(
PackageLoaded
())
except
TimeoutException
as
exc
:
except
TimeoutException
:
_display_driver_logs
(
self
.
browser
,
self
.
driver
)
print
(
self
.
logs
)
raise
TimeoutException
(
'wait_until_packages_loaded timed out'
)
...
...
test/test_python.py
View file @
defc24c4
...
...
@@ -71,7 +71,7 @@ def test_pythonexc2js(selenium):
try
:
selenium
.
run_js
(
'return pyodide.runPython("5 / 0")'
)
except
selenium
.
JavascriptException
as
e
:
assert
(
'ZeroDivisionError'
in
str
(
e
)
)
assert
'ZeroDivisionError'
in
str
(
e
)
else
:
assert
False
,
'Expected exception'
...
...
@@ -393,7 +393,7 @@ def test_cpython_core(python_test, selenium, request):
if e.code != 0:
raise RuntimeError(f'Failed with code: {{e.code}}')
"""
.
format
(
name
))
except
selenium
.
JavascriptException
as
e
:
except
selenium
.
JavascriptException
:
print
(
selenium
.
logs
)
raise
...
...
Write
Preview
Markdown
is supported
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