blob: ef5c3c1384fcf651eb169e247e1ea294b101a338 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
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)
|