diff --git a/approvaltests/core/options.py b/approvaltests/core/options.py index b98ce8a2..02b5f602 100644 --- a/approvaltests/core/options.py +++ b/approvaltests/core/options.py @@ -85,6 +85,6 @@ def namer(self) -> Namer: def inline(self, inline_options: InlineOptions = None) -> "Options": from approvaltests.namer.inline_comparator import InlineComparator - print(f'inline_options = {inline_options.__class__.__name__}') + return InlineComparator().register(self, inline_options) diff --git a/approvaltests/namer/inline_comparator.py b/approvaltests/namer/inline_comparator.py index 01eed1d8..fb32d401 100644 --- a/approvaltests/namer/inline_comparator.py +++ b/approvaltests/namer/inline_comparator.py @@ -45,9 +45,8 @@ def get_caller_method(caller_frame) -> Callable: #return InlineComparator().register(self, inline_options) def register(self, options: "Options", inline_options: InlineOptions = None): - inline_options = InlineOptions() if inline_options is None else inline_options + inline_options = InlineOptions.show_code() if inline_options is None else inline_options options2 = options.with_namer(self) - print(f'inline_options = {inline_options.__class__.__name__}') options2 = inline_options.apply(options2) return options2 diff --git a/tests/test_inline_approvals.py b/tests/test_inline_approvals.py index dc6fa55e..18b4a056 100644 --- a/tests/test_inline_approvals.py +++ b/tests/test_inline_approvals.py @@ -180,44 +180,4 @@ def test_bug_blank_lines(): verify( "\n\ntest bug with blank lines\n\n\n\n", options=Options().inline() - ) - - - - - -def test_semi_automatic_inline_reporter(): - """ - 1 - 2 - - """ - #verify("1\n2\n5", options=Options().inline(InlineOptions.semi_automatic())) - #verify("1\n2\n5", options=Options().inline(InlineOptions.automatic())) - # verify("1\n2\n5", options=Options().inline(InlineOptions.applesauce())) # when it is false - #verify("1\n2\n5", options=Options().inline(InlineOptions.show_code())) - verify("1\n2\n5", options=Options().inline(InlineOptions.show_code())) - - # show_code - # keep show_code becase we only want to change one thing at time - - # reports contents only - # report contents without showing code - # compare full source code - # report on - # inline only on test resutls - #report docstring only only report the docstring - # report results only - # report results and docstring - #use diffcompare in traditional way - # use diffcompare in inline way - #only report the results - # report results only - # report results without surrounding code - # report results no surrounding code - # results only - # no surrounding code - # diffcompare in inline way - # --- - # showcode = false - # \ No newline at end of file + )