File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -203,9 +203,9 @@ def make_arg_parser(
203203 )
204204 parser .add_argument (
205205 "--no-validate" ,
206- action = "store_false" ,
206+ action = "store_const" ,
207+ const = False ,
207208 dest = "validate" ,
208- default = None ,
209209 help = "do not validate that the rendered HTML is consistent" ,
210210 )
211211 version_str = f"mdformat { mdformat .__version__ } "
Original file line number Diff line number Diff line change 11from io import StringIO
22import sys
33from unittest import mock
4- from unittest .mock import patch
54
65import pytest
76
@@ -158,7 +157,7 @@ def test_conf_no_validate(tmp_path):
158157 content = "1. ordered"
159158 file_path .write_text (content )
160159
161- with patch ("mdformat.renderer._context.get_list_marker_type" , return_value = "?" ):
160+ with mock . patch ("mdformat.renderer._context.get_list_marker_type" , return_value = "?" ):
162161 assert run_with_clear_cache ((str (file_path ),)) == 1
163162 assert file_path .read_text () == content
164163
You can’t perform that action at this time.
0 commit comments