Skip to content
Snippets Groups Projects
Commit 80523b00 authored by ulif's avatar ulif
Browse files

Add test to ensure configs in $HOME are read.

By default we should read config files in user
homes.
parent 1a44cd51
No related branches found
No related tags found
No related merge requests found
......@@ -32,3 +32,10 @@ class TestConfigModule(object):
# we cope with no list at all
found, config = get_configparser()
assert found == []
def test_get_configparser_default_path(self, home_dir):
# a config file in $HOME is looked up by default
config_file = home_dir / ".diceware.ini"
config_file.write("\n".join(["[diceware]", "num = 3", ""]))
found, config = get_configparser()
assert found == [str(config_file)]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment