Skip to content

Commit bfc0165

Browse files
committed
Fix should_skip_dist test and not test in CI warning
1 parent b7e1f7a commit bfc0165

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

tests/stubtest_third_party.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def run_stubtest(
182182
print_success_msg()
183183

184184
if (
185-
not stubtest_settings.platforms
185+
sys.platform not in stubtest_settings.platforms
186186
and sys.platform not in DEFAULT_STUBTEST_PLATFORMS
187187
and not specified_platforms_only
188188
):
@@ -201,14 +201,7 @@ def run_stubtest(
201201

202202

203203
def should_skip_dist(stubtest_settings: StubtestSettings, *, specified_platforms_only: bool) -> bool:
204-
if stubtest_settings.platforms:
205-
# Platforms explicitly specified in METADATA.toml:
206-
# skip if the current platform is not in the list.
207-
return sys.platform not in stubtest_settings.platforms
208-
else:
209-
# Platforms not specified in METADATA.toml:
210-
# skip if the --specified-platforms-only flag is set.
211-
return specified_platforms_only
204+
return specified_platforms_only and sys.platform not in stubtest_settings.platforms
212205

213206

214207
def setup_gdb_stubtest_command(venv_dir: Path, stubtest_cmd: list[str]) -> bool:

0 commit comments

Comments
 (0)