@@ -89,9 +89,9 @@ def pytest_addoption(parser):
8989
9090 parser .addoption ("--text-file-format" , action = "store" ,
9191 help = (
92- "Text file format for narrative documentation. "
93- "Options accepted are 'txt', 'tex', and 'rst'. "
94- "This is no longer recommended, use --doctest-glob instead."
92+ "Text file format for narrative documentation. "
93+ "Options accepted are 'txt', 'tex', and 'rst'. "
94+ "This is no longer recommended, use --doctest-glob instead."
9595 ))
9696
9797 # Defaults to `atol` parameter from `numpy.allclose`.
@@ -139,8 +139,8 @@ def pytest_addoption(parser):
139139 default = [])
140140
141141 parser .addini ("doctest_subpackage_requires" ,
142- "A list of paths to skip if requirements are not satisfied. Each item in the list "
143- "should have the syntax path=req1;req2" ,
142+ "A list of paths to skip if requirements are not satisfied."
143+ "Each item in the list should have the syntax path=req1;req2" ,
144144 type = 'linelist' ,
145145 default = [])
146146
@@ -156,7 +156,8 @@ def get_optionflags(parent):
156156def pytest_configure (config ):
157157 doctest_plugin = config .pluginmanager .getplugin ('doctest' )
158158 run_regular_doctest = config .option .doctestmodules and not config .option .doctest_plus
159- use_doctest_plus = config .getini ('doctest_plus' ) or config .option .doctest_plus or config .option .doctest_only
159+ use_doctest_plus = config .getini (
160+ 'doctest_plus' ) or config .option .doctest_plus or config .option .doctest_only
160161 if doctest_plugin is None or run_regular_doctest or not use_doctest_plus :
161162 return
162163
@@ -301,7 +302,8 @@ class DocTestParserPlus(doctest.DocTestParser):
301302
302303 - ``.. doctest-skip-all``: Skip all subsequent doctests.
303304
304- - ``.. doctest-remote-data::``: Skip the next doctest chunk if --remote-data is not passed.
305+ - ``.. doctest-remote-data::``: Skip the next doctest chunk if
306+ --remote-data is not passed.
305307 """
306308
307309 def parse (self , s , name = None ):
@@ -333,7 +335,8 @@ def parse(self, s, name=None):
333335 required = []
334336 skip_next = False
335337 lines = entry .strip ().splitlines ()
336- if any ([re .match ('{} doctest-skip-all' .format (comment_char ), x .strip ()) for x in lines ]):
338+ if any ([re .match (
339+ '{} doctest-skip-all' .format (comment_char ), x .strip ()) for x in lines ]):
337340 skip_all = True
338341 continue
339342
@@ -361,9 +364,8 @@ def parse(self, s, name=None):
361364 continue
362365
363366 if config .getoption ('remote_data' , 'none' ) != 'any' :
364- print (config .getoption ('remote_data' , 'none' ) != 'any' )
365367 matches = [re .match (
366- r'{}\s+doctest-remote-data\s*::(\s+.*)? ' .format (comment_char ),
368+ r'{}\s+doctest-remote-data\s*::' .format (comment_char ),
367369 last_line ) for last_line in last_lines ]
368370
369371 if len (matches ) > 1 :
@@ -372,12 +374,8 @@ def parse(self, s, name=None):
372374 match = matches [0 ]
373375
374376 if match :
375- marker = match .group (1 )
376- if (marker is None or
377- (marker .strip () == 'win32' and
378- sys .platform == 'win32' )):
379- skip_next = True
380- continue
377+ skip_next = True
378+ continue
381379
382380 matches = [re .match (
383381 r'{}\s+doctest-requires\s*::\s+(.*)' .format (comment_char ),
0 commit comments