()
| 213 | |
| 214 | |
| 215 | def test_dict(): |
| 216 | context = limited(data={"a": 1, "b": {"x": 2}, ("x", "y"): 3}) |
| 217 | assert guarded_eval('data["a"]', context) == 1 |
| 218 | assert guarded_eval('data["b"]', context) == {"x": 2} |
| 219 | assert guarded_eval('data["b"]["x"]', context) == 2 |
| 220 | assert guarded_eval('data["x", "y"]', context) == 3 |
| 221 | |
| 222 | assert guarded_eval("data.keys", context) |
| 223 | |
| 224 | |
| 225 | def test_set(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…