mirror of
https://github.com/dtomlinson91/panaetius.git
synced 2025-12-22 04:55:44 +00:00
adding latest
This commit is contained in:
@@ -1,5 +1,24 @@
|
||||
from panaetius import __version__
|
||||
import os
|
||||
|
||||
from panaetius import Config, set_config
|
||||
|
||||
def test_version():
|
||||
assert __version__ == '0.1.0'
|
||||
if __name__ == "__main__":
|
||||
os.environ["PANAETIUS_TEST_PATH"] = "/usr/local"
|
||||
print(os.environ.get("PANAETIUS_TEST_PATH"))
|
||||
os.environ[
|
||||
"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")
|
||||
print(c)
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user