Uploaded Test files
This commit is contained in:
parent
f584ad9d97
commit
2e81cb7d99
16627 changed files with 2065359 additions and 102444 deletions
39
venv/Lib/site-packages/ipywidgets/widgets/tests/test_link.py
Normal file
39
venv/Lib/site-packages/ipywidgets/widgets/tests/test_link.py
Normal file
|
@ -0,0 +1,39 @@
|
|||
# Copyright (c) Jupyter Development Team.
|
||||
# Distributed under the terms of the Modified BSD License.
|
||||
|
||||
import pytest
|
||||
|
||||
from .. import jslink, jsdlink, ToggleButton
|
||||
from .utils import setup, teardown
|
||||
|
||||
def test_jslink_args():
|
||||
with pytest.raises(TypeError):
|
||||
jslink()
|
||||
w1 = ToggleButton()
|
||||
with pytest.raises(TypeError):
|
||||
jslink((w1, 'value'))
|
||||
|
||||
w2 = ToggleButton()
|
||||
jslink((w1, 'value'), (w2, 'value'))
|
||||
|
||||
with pytest.raises(TypeError):
|
||||
jslink((w1, 'value'), (w2, 'nosuchtrait'))
|
||||
|
||||
with pytest.raises(TypeError):
|
||||
jslink((w1, 'value'), (w2, 'traits'))
|
||||
|
||||
def test_jsdlink_args():
|
||||
with pytest.raises(TypeError):
|
||||
jsdlink()
|
||||
w1 = ToggleButton()
|
||||
with pytest.raises(TypeError):
|
||||
jsdlink((w1, 'value'))
|
||||
|
||||
w2 = ToggleButton()
|
||||
jsdlink((w1, 'value'), (w2, 'value'))
|
||||
|
||||
with pytest.raises(TypeError):
|
||||
jsdlink((w1, 'value'), (w2, 'nosuchtrait'))
|
||||
|
||||
with pytest.raises(TypeError):
|
||||
jsdlink((w1, 'value'), (w2, 'traits'))
|
Loading…
Add table
Add a link
Reference in a new issue