Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/copilot/test/simulation/fixtures/tests/py-newtest-4658/ex.py
13405 views
1
def check_skipped_condition(item):
2
"""A helper function that checks if a item has a skip or a true skip condition.
3
4
Keyword arguments:
5
item -- the pytest item object.
6
"""
7
8
for marker in item.own_markers:
9
# If the test is marked with skip then it will not hit the pytest_report_teststatus hook,
10
# therefore we need to handle it as skipped here.
11
skip_condition = False
12
if marker.name == "skipif":
13
skip_condition = any(marker.args)
14
if marker.name == "skip" or skip_condition:
15
return True
16
return False
17
18