def test_overrides_parent_scope(): glob = Frame({'x': 2}, None) child = Frame({}, glob) child['x'] = 3 assert glob['x'] == 3 child['b'] = 3 assert not glob.get('b')
def test_getitem(): glob = Frame({'x': 2}, None) frame = Frame({'y': 3}, glob) assert frame.get('x') == 2
def test_get(): glob = Frame({'x': 2}, None) Frame({'y': 2, 'a': 3}, glob) assert not glob.get('z')