Skip to content

Commit

Permalink
Python 2/3 shim in tests so they pass on python 2 for ipywidgets 7.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jasongrout committed Mar 10, 2022
1 parent c6c9087 commit ff4855b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ipywidgets/widgets/tests/test_interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,12 @@ def test_iterable_tuple():
check_widgets(c, lis=d)

def test_mapping():
from collections.abc import Mapping
try:
# Python 3
from collections.abc import Mapping
except ImportError:
# Python 2
from collections import Mapping
class TestMapping(Mapping):
def __init__(self, values):
self.values = values
Expand Down

0 comments on commit ff4855b

Please sign in to comment.