예제 #1
0
 def test_getattrs_none_returns_empty(self):
     """make sure None returns empty dict"""
     out = getattrs(None, ["bob"])
     assert isinstance(out, dict)
     assert not out
예제 #2
0
def _get_origin_basic(eve):
    """extract basic info from origin."""
    ori = get_preferred(eve, "origin", init_empty=True)
    return getattrs(ori, set(loc_dtypes))
예제 #3
0
 def test_getattrs_unused_attr(self):
     """simple tests for getattrs"""
     instance = "instance"
     assert getattrs(instance, ("bob", )) == {"bob": np.NaN}