Skip to content

Commit 44ecafb

Browse files
committed
add msg for doctest support
1 parent 11fa35d commit 44ecafb

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

python_files/unittestadapter/pvsc_utils.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
import argparse
55
import atexit
6+
import doctest
67
import enum
78
import inspect
89
import 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

0 commit comments

Comments
 (0)