MCPcopy
hub / github.com/pathwaycom/pathway / test_variables

Function test_variables

python/pathway/tests/test_yaml.py:62–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60
61
62def test_variables():
63 yaml_config = """
64$foo: !pw.tests.test_yaml.Foo
65 a: 1
66 c: "bar"
67
68bar: !pw.tests.test_yaml.Bar
69 d: $foo
70"""
71
72 d = load_yaml(yaml_config)
73 assert "bar" in d.keys()
74 assert d["bar"] == Bar(Foo(a=1, c="bar"))
75
76 yaml_config2 = """
77foo: !pw.tests.test_yaml.Foo
78 a: 1
79 c: "bar"
80
81bar: !pw.tests.test_yaml.Bar
82 d: foo
83"""
84
85 d = load_yaml(yaml_config2)
86 assert "bar" in d.keys()
87 assert d["bar"] == Bar("foo")
88
89
90def test_typo_in_key():

Callers

nothing calls this directly

Calls 4

load_yamlFunction · 0.90
BarClass · 0.85
FooClass · 0.85
keysMethod · 0.45

Tested by

no test coverage detected