File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
python_files/unittestadapter Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 33
44import argparse
55import atexit
6+ import doctest
67import enum
78import inspect
89import json
@@ -202,6 +203,12 @@ def build_test_tree(
202203 root = build_test_node (top_level_directory , directory_path .name , TestNodeTypeEnum .folder )
203204
204205 for test_case in get_test_case (suite ):
206+ if isinstance (test_case , doctest .DocTestCase ):
207+ print (
208+ "Skipping doctest as it is not supported for the extension. Test case: " , test_case
209+ )
210+ continue
211+ print ("post skip: test case" , test_case )
205212 test_id = test_case .id ()
206213 if test_id .startswith ("unittest.loader._FailedTest" ):
207214 error .append (str (test_case ._exception )) # type: ignore # noqa: SLF001
@@ -255,9 +262,6 @@ def build_test_tree(
255262 } # concatenate class name and function test name
256263 current_node ["children" ].append (test_node )
257264
258- if not root ["children" ]:
259- root = None
260-
261265 return root , error
262266
263267
You can’t perform that action at this time.
0 commit comments