forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
handle skip unittest at file without error (#21678)
fixes #21653
- Loading branch information
1 parent
9bcb82d
commit 73a0e9d
Showing
4 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
pythonFiles/tests/pytestadapter/.data/unittest_skiptest_file_level.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
|
||
import unittest | ||
from unittest import SkipTest | ||
|
||
# Due to the skip at the file level, no tests will be discovered. | ||
raise SkipTest("Skip all tests in this file, they should not be recognized by pytest.") | ||
|
||
|
||
class SimpleTest(unittest.TestCase): | ||
def testadd1(self): | ||
assert True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters