Skip to content

Commit

Permalink
test(test_conf.py): add a test case for --config option
Browse files Browse the repository at this point in the history
  • Loading branch information
rockleona authored and Lee-W committed Apr 11, 2024
1 parent 5e2cc6c commit 85a5ec2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,15 @@ def test_load_empty_pyproject_toml_and_cz_toml_with_config(_, tmpdir):
cfg = config.read_cfg()
assert cfg.settings == _settings

def test_load_pyproject_toml_not_in_root_folder(_, tmpdir):
with tmpdir.as_cwd():
_not_root_path = tmpdir.mkdir("not_in_root")
p = tmpdir.join("./not_in_root/pyproject.toml")
p.write(PYPROJECT)

cfg = config.read_cfg(filepath="./not_in_root/pyproject.toml")
assert cfg.settings == _settings


class TestTomlConfig:
def test_init_empty_config_content(self, tmpdir):
Expand Down

0 comments on commit 85a5ec2

Please sign in to comment.