| Conditions | 1 |
| Total Lines | 14 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import pytest |
||
| 11 | def test_lookup_path(): |
||
| 12 | |||
| 13 | node = {'a': {'b': 1, 'c': {"d": "test"}}, 'e': False, 'd': None} |
||
| 14 | |||
| 15 | assert (False, None) == lookup_path(None, None) |
||
| 16 | assert (False, None) == lookup_path(None, "a") |
||
| 17 | assert (False, None) == lookup_path(node, None) |
||
| 18 | assert (True, False) == lookup_path(node, "e") |
||
| 19 | assert (False, None) == lookup_path(node, ()) |
||
| 20 | assert (True, False) == lookup_path(node, ("e",)) |
||
| 21 | assert (True, 1) == lookup_path(node, ("a", "b")) |
||
| 22 | assert (True, "test") == lookup_path(node, ("a", "c", "d")) |
||
| 23 | assert (False, None) == lookup_path(node, ("a", "d", "c", "d")) |
||
| 24 | assert (True, None) == lookup_path(node, "d") |
||
| 25 |