File tree Expand file tree Collapse file tree 3 files changed +44
-1
lines changed
python/ipywidgets/ipywidgets/widgets/tests Expand file tree Collapse file tree 3 files changed +44
-1
lines changed Original file line number Diff line number Diff line change
1
+ # Copyright (c) Jupyter Development Team.
2
+ # Distributed under the terms of the Modified BSD License.
3
+
4
+ import pytest
5
+ from ipywidgets import Button
6
+
7
+ def test_deprecation_fa_icons ():
8
+ with pytest .deprecated_call ():
9
+ Button (icon = 'fa-home' )
Original file line number Diff line number Diff line change
1
+ # Copyright (c) Jupyter Development Team.
2
+ # Distributed under the terms of the Modified BSD License.
3
+
4
+ import pytest
5
+
6
+ from ..utils import deprecation
7
+
8
+ def test_deprecation ():
9
+ with pytest .deprecated_call () as w :
10
+ deprecation ('Deprecated call' )
11
+ # Make sure the deprecation pointed to the external function calling this test function
12
+ assert w [0 ].filename .endswith ('_pytest/python.py' )
13
+
14
+ with pytest .deprecated_call () as w :
15
+ deprecation ('Deprecated call' , ['ipywidgets/widgets/tests' ])
16
+ # Make sure the deprecation pointed to the external function calling this test function
17
+ assert w [0 ].filename .endswith ('_pytest/python.py' )
Original file line number Diff line number Diff line change 1
1
# Copyright (c) Jupyter Development Team.
2
2
# Distributed under the terms of the Modified BSD License.
3
3
4
- from ..widget_string import Combobox
4
+ from ..widget_string import Combobox , Text
5
+ import pytest
5
6
6
7
7
8
def test_combobox_creation_blank ():
@@ -32,3 +33,19 @@ def test_combobox_creation_kwargs():
32
33
"Vanilla" ,
33
34
)
34
35
assert w .ensure_option == True
36
+
37
+ def test_deprecation_description_tooltip ():
38
+ with pytest .deprecated_call ():
39
+ Text (description_tooltip = 'tooltip' )
40
+
41
+ with pytest .deprecated_call ():
42
+ Text ().description_tooltip
43
+
44
+
45
+ with pytest .deprecated_call ():
46
+ Text ().description_tooltip = 'tooltip'
47
+
48
+
49
+ def test_deprecation_on_submit ():
50
+ with pytest .deprecated_call ():
51
+ Text ().on_submit (lambda * args : ...)
You can’t perform that action at this time.
0 commit comments