Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
import os


# Skipping the test on the ARM runners and macos-15, as we're running into trouble with Mono and nuget.
# Skipping the test on the ARM runners, macos-15 and macos-26, as we're running
# into trouble with Mono and nuget.
@pytest.mark.only_if(
runs_on.linux
or (runs_on.macos and runs_on.x86_64 and not runs_on.macos_15)
or (runs_on.macos and runs_on.x86_64
and not runs_on.macos_15 and not runs_on.macos_26)
)
def test(codeql, csharp):
os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_DOTNET_FRAMEWORK_REFERENCES"] = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
import pytest


# Skipping the test on the ARM runners and macos-15, as we're running into trouble with Mono and nuget.
# Skipping the test on the ARM runners, macos-15 and macos-26, as we're running
# into trouble with Mono and nuget.
@pytest.mark.only_if(
runs_on.linux
or (runs_on.macos and runs_on.x86_64 and not runs_on.macos_15)
or (runs_on.macos and runs_on.x86_64
and not runs_on.macos_15 and not runs_on.macos_26)
)
def test(codeql, csharp):
# making sure we're not doing any fallback restore:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
import pytest


# Skipping the test on the ARM runners and macos-15, as we're running into trouble with Mono and nuget.
# Skipping the test on the ARM runners, macos-15 and macos-26, as we're running
# into trouble with Mono and nuget.
@pytest.mark.only_if(
runs_on.linux
or (runs_on.macos and runs_on.x86_64 and not runs_on.macos_15)
or (runs_on.macos and runs_on.x86_64
and not runs_on.macos_15 and not runs_on.macos_26)
)
def test(codeql, csharp):
codeql.database.create(build_mode="none")
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
import pytest


# Skipping the test on the ARM runners, as we're running into trouble with Mono and nuget.
# Skipping the test on the ARM runners, macos-15 and macos-26, as we're running
# into trouble with Mono and nuget.
@pytest.mark.only_if(
runs_on.linux
or (runs_on.macos and runs_on.x86_64 and not runs_on.macos_15)
or (runs_on.macos and runs_on.x86_64
and not runs_on.macos_15 and not runs_on.macos_26)
)
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This skip predicate (and its accompanying comment) is duplicated across multiple test files in this PR. To reduce duplication and keep the excluded macOS version list consistent, consider centralizing the predicate in a shared helper (e.g., a variable/fixture in conftest.py or a small utility function) and reusing it across these tests.

See below for a potential fix:

def _supports_mono_nuget():
    return (
        runs_on.linux
        or (
            runs_on.macos
            and runs_on.x86_64
            and not runs_on.macos_15
            and not runs_on.macos_26
        )
    )


@pytest.mark.only_if(_supports_mono_nuget())

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot can you implement this suggestion?

def test(codeql, csharp):
codeql.database.create(source_root="proj", build_mode="none")
Loading