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

Merge branch 'test' into 'master'

[click] Update test case

Closes #87

See merge request !139
parents 2eda6b64 8be7288c
No related branches found
No related tags found
1 merge request!139[click] Update test case
Pipeline #60119 failed
'''Configuration file automatically generated at 08/07/2018 """Configuration file automatically generated at 08/07/2018
cli test cli test
Test command Test command
Examples!''' Examples!"""
# test = /my/path/test.txt # test = /my/path/test.txt
'''Required parameter: test (-t, --test) """Required parameter: test (-t, --test)
Path leading to test blablabla''' Path leading to test blablabla"""
# verbose = 0 # verbose = 0
'''Optional parameter: verbose (-v, --verbose) [default: 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).''' 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 cli test
Blablabla bli blo Blablabla bli blo
Parameters Parameters
---------- ----------
xxx : :any:`list` xxx : :any:`list`
blabla blablo blabla blablo
yyy : callable yyy : callable
bli bla blo bla bla bla bli bla blo bla bla bla
[CONFIG]... BLA BLA BLA BLA''' [CONFIG]... BLA BLA BLA BLA"""
# database = None # 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`. 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 # 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`. 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 # output_dir = None
'''Required parameter: output_dir (--output-dir, -o) """Required parameter: output_dir (--output-dir, -o)
blo blo blo''' blo blo blo"""
# force = False # force = False
'''Optional parameter: force (--force, -f) [default: False] """Optional parameter: force (--force, -f) [default: False]
lalalalalala''' lalalalalala"""
# array = 1 # array = 1
'''Optional parameter: array (--array) [default: 1] """Optional parameter: array (--array) [default: 1]
lililili''' lililili"""
# database_directories_file = ~/databases.txt # database_directories_file = ~/databases.txt
'''Optional parameter: database_directories_file (--database-directories-file) [default: ~/databases.txt] """Optional parameter: database_directories_file (--database-directories-file) [default: ~/databases.txt]
lklklklk''' lklklklk"""
# verbose = 0 # verbose = 0
'''Optional parameter: verbose (-v, --verbose) [default: 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).''' 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): ...@@ -185,7 +185,7 @@ def _assert_config_dump(ref, ref_date):
# uncomment below to re-write tests # uncomment below to re-write tests
# open(ref, 'wt').write(open('TEST_CONF').read()) # open(ref, 'wt').write(open('TEST_CONF').read())
with open("TEST_CONF", "r") as f, open(ref, "r") as f2: 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) ref_text = f2.read().replace(ref_date, today)
assert text == ref_text, "\n".join( assert text == ref_text, "\n".join(
[text, "########################\n" * 2, ref_text] [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