Skip to content

Commit

Permalink
update config tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CunliangGeng committed Mar 1, 2024
1 parent 62a0d22 commit 5400394
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
3 changes: 0 additions & 3 deletions tests/data/nplinker_demo1.toml

This file was deleted.

16 changes: 7 additions & 9 deletions tests/test_config.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
from nplinker.config import config


def test_config_demo1():
"""Test loading the default config file (nplinker_demo1.toml)."""
# The file "nplinker_demo1.toml" is set in ./conftest.py

assert config.mode == "podp"
assert config.podp_id == "4b29ddc3-26d0-40d7-80c5-44fb6631dbf9.4"
def test_config():
"""Test loading the default config file."""
# The default config file is set in "./conftest.py", which is "data/nplinker_local_mode.toml"
assert config.mode == "local"
assert config.log.level == "DEBUG"
assert config["log.level"] == "DEBUG"
assert config.get("log.level") == "DEBUG"

# The following are default values from nplinker_default.toml
assert config.log.level == "INFO"
assert config["log.level"] == "INFO"
assert config.get("log.level") == "INFO"
assert config.get("log.file") is None
assert config.log.to_stdout is True

Expand Down

0 comments on commit 5400394

Please sign in to comment.