@@ -112,10 +112,6 @@ def pytest_addoption(parser):
112112 "This is no longer recommended, use --doctest-glob instead."
113113 ))
114114
115- parser .addoption ("--text-file-encoding" , action = "store" ,
116- help = "Specify encoding for files." ,
117- default = "utf-8" )
118-
119115 # Defaults to `atol` parameter from `numpy.allclose`.
120116 parser .addoption ("--doctest-plus-atol" , action = "store" ,
121117 help = "set the absolute tolerance for float comparison" ,
@@ -147,9 +143,6 @@ def pytest_addoption(parser):
147143 "Default format for docs. "
148144 "This is no longer recommended, use --doctest-glob instead." )
149145
150- parser .addini ("text_file_encoding" ,
151- "Default encoding for text files." , default = None )
152-
153146 parser .addini ("doctest_optionflags" , "option flags for doctests" ,
154147 type = "args" , default = ["ELLIPSIS" , "NORMALIZE_WHITESPACE" ],)
155148
@@ -961,8 +954,7 @@ def pytest_terminal_summary(terminalreporter, exitstatus, config):
961954 if not diff_mode :
962955 return # we do not report or apply diffs
963956
964- # get encoding to open file default ini=None or option="utf-8"
965- encoding = config .getini ("text_file_encoding" ) or config .getoption ("text_file_encoding" )
957+ encoding = config .getini ("doctest_encoding" )
966958
967959 if diff_mode != "overwrite" :
968960 # In this mode, we write a corrected file to a temporary folder in
0 commit comments