Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p committed Oct 14, 2024
1 parent 9bf001b commit 2f92230
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
arch: x64
os: windows-latest
toxenv: py38
color: false
tox_extra_args: "-n 0 mypy/test/testpythoneval.py::PythonEvaluationSuite::pythoneval.test::testDataclassReplace"
- name: Test suite with py39-ubuntu
python: '3.9'
Expand Down Expand Up @@ -127,7 +128,7 @@ jobs:
env:
TOX_SKIP_MISSING_INTERPRETERS: False
# Rich (pip)
FORCE_COLOR: 1
FORCE_COLOR: ${{ matrix.color != 'false' && 1 || 0 }}
# Tox
PY_COLORS: 1
# Mypy (see https://github.com/python/mypy/issues/7771)
Expand Down
4 changes: 2 additions & 2 deletions mypy/test/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ def assert_string_arrays_equal(
if expected != actual:
expected_ranges, actual_ranges = diff_ranges(expected, actual)
sys.stderr.write("Expected:\n")
red = "\033[31m" # if sys.platform != "win32" else None
red = "\033[31m" if sys.platform != "win32" else None
render_diff_range(expected_ranges, expected, colour=red)
sys.stderr.write("Actual:\n")
green = "\033[32m" # if sys.platform != "win32" else None
green = "\033[32m" if sys.platform != "win32" else None
render_diff_range(actual_ranges, actual, colour=green)

sys.stderr.write("\n")
Expand Down

0 comments on commit 2f92230

Please sign in to comment.