adding latest working

This commit is contained in:
2021-10-16 04:47:32 +01:00
parent b9721f6ee4
commit 2c0735fedf
3 changed files with 46 additions and 31 deletions

View File

@@ -9,16 +9,16 @@ if __name__ == "__main__":
"PANAETIUS_TEST_TOML_POINTS"
] = "[ { x = 1, y = 2, z = 3 }, { x = 7, y = 8, z = 9 }, { x = 2, y = 4, z = 8 }]"
c = Config("panaetius_test")
# print(c.config)
# c.get_value("path", "some path")
# c.get_value("top", "str")
# c.get_value("logging.path", "str")
# c.get_value("nonexistent.item", "some default value")
set_config(c, key="path", default="some path")
set_config(c, key="top", default="some top")
set_config(c, key="logging.path", default="some logging path")
set_config(c, key="nonexistent.item", default="some nonexistent item")
set_config(c, key="nonexistent.item")
set_config(c, key="toml.points")
set_config(c, key="toml.points", coerce=True)
set_config(c, key="toml.points_config")
set_config(c, key="float", default=2.0)
set_config(c, key="float_str", default="2.0")
print(c)
pass