Skip to content
Snippets Groups Projects
Commit 8be7288c authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

[click] Update test case

parent 2eda6b64
No related branches found
No related tags found
1 merge request!139[click] Update test case
Pipeline #59924 passed
'''Configuration file automatically generated at 08/07/2018
"""Configuration file automatically generated at 08/07/2018
cli test
Test command
Examples!'''
Examples!"""
# test = /my/path/test.txt
'''Required parameter: test (-t, --test)
Path leading to test blablabla'''
"""Required parameter: test (-t, --test)
Path leading to test blablabla"""
# verbose = 0
'''Optional parameter: verbose (-v, --verbose) [default: 0]
Increase the verbosity level from 0 (only error messages) to 1 (warnings), 2 (log messages), 3 (debug information) by adding the --verbose option as often as desired (e.g. '-vvv' for debug).'''
"""Optional parameter: verbose (-v, --verbose) [default: 0]
Increase the verbosity level from 0 (only error messages) to 1 (warnings), 2 (log messages), 3 (debug information) by adding the --verbose option as often as desired (e.g. '-vvv' for debug)."""
'''Configuration file automatically generated at 08/07/2018
"""Configuration file automatically generated at 08/07/2018
cli test
Blablabla bli blo
......@@ -10,34 +10,34 @@ xxx : :any:`list`
yyy : callable
bli bla blo bla bla bla
[CONFIG]... BLA BLA BLA BLA'''
[CONFIG]... BLA BLA BLA BLA"""
# database = None
'''Required parameter: database (--database, -d)
"""Required parameter: database (--database, -d)
bla bla bla Can be a ``bob.extension.test_dump_config`` entry point, a module name, or a path to a Python file which contains a variable named `database`.
Registered entries are: ['basic_config', 'resource_config', 'subpackage_config']'''
Registered entries are: ['basic_config', 'resource_config', 'subpackage_config']"""
# annotator = None
'''Required parameter: annotator (--annotator, -a)
"""Required parameter: annotator (--annotator, -a)
bli bli bli Can be a ``bob.extension.test_dump_config`` entry point, a module name, or a path to a Python file which contains a variable named `annotator`.
Registered entries are: ['basic_config', 'resource_config', 'subpackage_config']'''
Registered entries are: ['basic_config', 'resource_config', 'subpackage_config']"""
# output_dir = None
'''Required parameter: output_dir (--output-dir, -o)
blo blo blo'''
"""Required parameter: output_dir (--output-dir, -o)
blo blo blo"""
# force = False
'''Optional parameter: force (--force, -f) [default: False]
lalalalalala'''
"""Optional parameter: force (--force, -f) [default: False]
lalalalalala"""
# array = 1
'''Optional parameter: array (--array) [default: 1]
lililili'''
"""Optional parameter: array (--array) [default: 1]
lililili"""
# database_directories_file = ~/databases.txt
'''Optional parameter: database_directories_file (--database-directories-file) [default: ~/databases.txt]
lklklklk'''
"""Optional parameter: database_directories_file (--database-directories-file) [default: ~/databases.txt]
lklklklk"""
# verbose = 0
'''Optional parameter: verbose (-v, --verbose) [default: 0]
Increase the verbosity level from 0 (only error messages) to 1 (warnings), 2 (log messages), 3 (debug information) by adding the --verbose option as often as desired (e.g. '-vvv' for debug).'''
"""Optional parameter: verbose (-v, --verbose) [default: 0]
Increase the verbosity level from 0 (only error messages) to 1 (warnings), 2 (log messages), 3 (debug information) by adding the --verbose option as often as desired (e.g. '-vvv' for debug)."""
......@@ -185,7 +185,7 @@ def _assert_config_dump(ref, ref_date):
# uncomment below to re-write tests
# open(ref, 'wt').write(open('TEST_CONF').read())
with open("TEST_CONF", "r") as f, open(ref, "r") as f2:
text = f.read()
text = f.read().replace("'''", '"""')
ref_text = f2.read().replace(ref_date, today)
assert text == ref_text, "\n".join(
[text, "########################\n" * 2, ref_text]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment