Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dosisod committed Dec 27, 2023
1 parent 6103901 commit ac56b62
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/conftest.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
from unittest.mock import patch
from collections.abc import Generator
from unittest.mock import Mock, patch

import pytest


@pytest.fixture(autouse=True)
def fake_tty():
def fake_tty() -> Generator[Mock, None, None]:
# Pytest doesnt run in a TTY, so the new TTY detection code is causing a lot of color related
# tests to fail. This hack makes it so color is always enabled, like it would in a normal TTY.
with patch("sys.stdout.isatty") as p:
Expand Down

0 comments on commit ac56b62

Please sign in to comment.