Skip to content
Snippets Groups Projects
Verified Commit 8d961f5f authored by Daniel Hornung's avatar Daniel Hornung
Browse files

TEST: Added debugging printout.

parent eb33ef7e
Branches
Tags
2 merge requests!57RELEASE 0.7.3,!54FIX: JSON schema now is more permissive, and fixed if-conditions.
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
# #
# This file is a part of the CaosDB Project. # This file is a part of the CaosDB Project.
# #
# Copyright (C) 2022 Indiscale GmbH <info@indiscale.com>
# Copyright (C) 2021 Alexander Schlemmer # Copyright (C) 2021 Alexander Schlemmer
# Copyright (C) 2022 Daniel Hornung <d.hornung@indiscale.com>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as # it under the terms of the GNU Affero General Public License as
...@@ -32,13 +34,14 @@ from configparser import ConfigParser ...@@ -32,13 +34,14 @@ from configparser import ConfigParser
def test_config_files(): def test_config_files():
for fn in glob(os.path.join(os.path.dirname(__file__), "test_configs", "*.ini")): for fn in glob(os.path.join(os.path.dirname(__file__), "test_configs", "*.ini")):
c = ConfigParser() c = ConfigParser()
print(f"Reading {fn}")
c.read(fn) c.read(fn)
validate_yaml_schema(config_to_yaml(c)) validate_yaml_schema(config_to_yaml(c))
def test_broken_config_files(): def test_broken_config_files():
for fn in glob(os.path.join(os.path.dirname(__file__), "broken_configs", "*.ini")): for fn in glob(os.path.join(os.path.dirname(__file__), "broken_configs", "*.ini")):
print(fn) print(f"Reading {fn}")
with raises(ValidationError): with raises(ValidationError):
c = ConfigParser() c = ConfigParser()
c.read(fn) c.read(fn)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment