1 from __future__
import absolute_import
2 from __future__
import division
3 from __future__
import print_function
4 from __future__
import unicode_literals
9 def pytest_addoption(parser):
12 '--generate-serialized',
15 help=
'generate output files (default=false, compares to current files)',
20 default=serial.DATA_DIR,
22 help=
'output directory (default: %(default)s)' 26 '--disable-serialized-check',
29 help=
'disable checking serialized tests' 33 '--disable-gen-coverage',
35 dest=
'disable_coverage',
36 help=
'disable generating coverage markdown file' 40 def pytest_configure(config):
41 generate = config.getoption(
'generate', default=
False)
42 output = config.getoption(
'output', default=serial.DATA_DIR)
43 disable = config.getoption(
'disable', default=
False)
44 disable_coverage = config.getoption(
'disable_coverage', default=
False)
45 serial._output_context.__setattr__(
'should_generate_output', generate)
46 serial._output_context.__setattr__(
'output_dir', output)
47 serial._output_context.__setattr__(
'disable_serialized_check', disable)
48 serial._output_context.__setattr__(
'disable_gen_coverage', disable_coverage)