Skip to content

Commit

Permalink
Merge pull request #12415 from mgorny/no-color
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg committed Mar 3, 2024
2 parents 0ad4c94 + 1836651 commit 13139cb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
schedule:
- cron: 0 0 * * MON # Run every Monday at 00:00 UTC

env:
# The "FORCE_COLOR" variable, when set to 1,
# tells Nox to colorize itself.
FORCE_COLOR: "1"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
Expand Down
Empty file.
4 changes: 4 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,10 @@ def isolate(tmpdir: Path, monkeypatch: pytest.MonkeyPatch) -> None:
# Make sure tests don't share a requirements tracker.
monkeypatch.delenv("PIP_BUILD_TRACKER", False)

# Make sure color control variables don't affect internal output.
monkeypatch.delenv("FORCE_COLOR", False)
monkeypatch.delenv("NO_COLOR", False)

# FIXME: Windows...
os.makedirs(os.path.join(home_dir, ".config", "git"))
with open(os.path.join(home_dir, ".config", "git", "config"), "wb") as fp:
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/test_inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from tests.lib import PipTestEnvironment, ScriptFactory, TestData


@pytest.fixture(scope="session")
@pytest.fixture
def simple_script(
tmpdir_factory: pytest.TempPathFactory,
script_factory: ScriptFactory,
Expand Down

0 comments on commit 13139cb

Please sign in to comment.