-
Notifications
You must be signed in to change notification settings - Fork 61
[CI] Revise the Windows skip logic of UT #2383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -27,21 +27,26 @@ def should_skip_entire_file(skip_list): | |||||||||||||||
| """Check if the skip list contains any entire file skip pattern (*.py::)""" | ||||||||||||||||
| if not skip_list: | ||||||||||||||||
| return False | ||||||||||||||||
| return any(item.endswith(".py::") for item in skip_list) | ||||||||||||||||
| return any(item.endswith(".py") for item in skip_list) | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
| # Import window skip dictionary if skip-cases is True | ||||||||||||||||
| if args.skip_cases: | ||||||||||||||||
| try: | ||||||||||||||||
| # Import the window skip dictionary module | ||||||||||||||||
| from window_skip_dict import skip_dict as window_skip_dict | ||||||||||||||||
| from windows_skip_cases import skip_dict as window_skip_dict | ||||||||||||||||
|
|
||||||||||||||||
| # Merge the window skip dictionary with the default one using intelligent strategy | ||||||||||||||||
| merged_skip_dict = {} | ||||||||||||||||
|
|
||||||||||||||||
| # First, copy all keys from default skip_dict | ||||||||||||||||
| for key in skip_dict: | ||||||||||||||||
| merged_skip_dict[key] = skip_dict[key].copy() if skip_dict[key] else [] | ||||||||||||||||
| if skip_dict[key] is None: | ||||||||||||||||
| merged_skip_dict[key] = [] | ||||||||||||||||
| elif isinstance(skip_dict[key], tuple): | ||||||||||||||||
| merged_skip_dict[key] = list(skip_dict[key]) | ||||||||||||||||
| else: | ||||||||||||||||
| merged_skip_dict[key] = skip_dict[key].copy() if skip_dict[key] else [] | ||||||||||||||||
|
Comment on lines
+39
to
+44
|
||||||||||||||||
| if skip_dict[key] is None: | |
| merged_skip_dict[key] = [] | |
| elif isinstance(skip_dict[key], tuple): | |
| merged_skip_dict[key] = list(skip_dict[key]) | |
| else: | |
| merged_skip_dict[key] = skip_dict[key].copy() if skip_dict[key] else [] | |
| merged_skip_dict[key] = list(skip_dict[key]) if isinstance(skip_dict[key], tuple) else (skip_dict[key].copy() if skip_dict[key] else []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skip_cases argument is for both linux and windows, right? Why import windows_skip_cases when skip_cases is true?