You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ORPA-pyOpenRPA/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/traitlets/utils/tests/test_bunch.py

15 lines
272 B

from ..bunch import Bunch
def test_bunch():
b = Bunch(x=5, y=10)
assert 'y' in b
assert 'x' in b
assert b.x == 5
b['a'] = 'hi'
assert b.a == 'hi'
def test_bunch_dir():
b = Bunch(x=5, y=10)
assert 'x' in dir(b)
assert 'keys' in dir(b)