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

Start support for config files.

parent 43a2a486
No related branches found
No related tags found
No related merge requests found
# diceware -- passphrases to remember
# Copyright (C) 2015 Uli Fouquet
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""config -- diceware configuration
`diceware` is configurable via commandline, configuration files and
direct API calls.
"""
import argparse
try:
import configparser # Python 3.x
except ImportError: # pragma: no cover
import ConfigParser as configparser # Python 2.x
OPTIONS_DEFAULTS = dict(
num=6,
caps=True,
specials=0,
delimiter="",
randomsource="system",
wordlist="en_8k",
)
from diceware.config import OPTIONS_DEFAULTS
class TestConfigModule(object):
# tests for diceware.config
def test_defaults(self):
# there is a set of defaults for options available
assert OPTIONS_DEFAULTS is not None
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment