Skip to content

Commit

Permalink
moved test_ruamel_yaml_loader.py to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
zerwes committed Oct 19, 2024
1 parent f772923 commit 4397fe7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/test_ruamel_yaml_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
sys.path.insert(
0,
os.path.join(
os.path.dirname(os.path.realpath(os.path.abspath(sys.argv[0]))), "lib"
os.path.dirname(os.path.realpath(os.path.abspath(sys.argv[0]))), "../test/lib"
),
)
import testsetup
Expand All @@ -42,7 +42,7 @@ def ruamel_loader(stream):
return yaml.load_all(stream)


conf = hiyapyco.load(os.path.join(basepath, "base.yaml"), loader_callback=ruamel_loader)
conf = hiyapyco.load(os.path.join(basepath, "../test/base.yaml"), loader_callback=ruamel_loader)

expected = {'singel': 'base', 'int': 1, 'array': ['base1', 'base2'], 'hash': {'k1': 'b1', 'k2': 'b2'}, 'deeplist': [{'d1': {'d1k1': 'v1', 'd1k2': 'v2'}}, {'d2': {'d2k1': 'x1', 'd2k2': 'x2'}}, {'d31': {'a': 'A', 'b': 'B', 'c': 'C'}, 'd32': {'a': 'A2', 'b': 'B2'}}], 'deepmap': {'l1k1': {'l2k1': 'xyz', 'l2k2': 'abc'}, 'l1k2': {'l2k1': 'bli', 'l2k2': 'bla', 'l2k3': 'blub'}}, 'missing_key': 'one', 'common_key': {'common_subkey_deep': 'one', 'missing_key_base': 'val2'}}

Expand Down

0 comments on commit 4397fe7

Please sign in to comment.