def test_as_set_converts_to_set_of_values(example_path, empty_context): a = as_set(example_path['%i'].bar['%j']) result = a._convert(empty_context) assert isinstance(result, set) assert result == {sentinel.foobarbaz, sentinel.moobarbaz, sentinel.foobarbang}
def test_as_set_converts_to_empty_set_when_less_than_one_wildcard_left_free(example_path, example_wildcarded_context): a = as_set(example_path['%i'].bar.baz) res = a._convert(example_wildcarded_context) assert res == set()
def test_as_set_with_relative_path_converts_to_set_of_values(example_context): a = as_set(up(2)["%i"].bar["%j"]) result = a._convert(example_context) assert isinstance(result, set) assert result == {sentinel.foobarbaz, sentinel.moobarbaz, sentinel.foobarbang}