diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 69409ac..2618d58 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -30,7 +30,7 @@ jobs: - name: Test with pytest run: | pip install pytest - pytest -xv --capture=tee-sys + pytest -xv -s build-newer-python: runs-on: ubuntu-22.04 @@ -54,4 +54,4 @@ jobs: - name: Test with pytest run: | pip install pytest - pytest -xv --capture=tee-sys + pytest -xv -s diff --git a/tests/test_tinta.py b/tests/test_tinta.py index a53ef8f..43455df 100644 --- a/tests/test_tinta.py +++ b/tests/test_tinta.py @@ -23,7 +23,6 @@ from typing import List, Tuple import pytest -from pytest import CaptureFixture # pylint: disable=import-error from tinta import Tinta @@ -93,24 +92,20 @@ def assert_its_not_easy_being_green(self, out: str): assert self.ITS_NOT_EASY in out assert "\x1b[38;5;35m" in out - def test_tint_takes_int_arg0_as_color(self, capfd: CaptureFixture[str]): - Tinta().tint(35, self.ITS_NOT_EASY).print() - out = capfd.readouterr().out + def test_tint_takes_int_arg0_as_color(self): + out = Tinta().tint(35, self.ITS_NOT_EASY).to_str() self.assert_its_not_easy_being_green(out) - def test_tint_takes_str_arg0_as_color(self, capfd: CaptureFixture[str]): - Tinta().tint("green", self.ITS_NOT_EASY).print() - out = capfd.readouterr().out + def test_tint_takes_str_arg0_as_color(self): + out = Tinta().tint("green", self.ITS_NOT_EASY).to_str() self.assert_its_not_easy_being_green(out) - def test_tint_takes_int_color_kwarg(self, capfd: CaptureFixture[str]): - Tinta().tint(self.ITS_NOT_EASY, color=35).print() - out = capfd.readouterr().out + def test_tint_takes_int_color_kwarg(self): + out = Tinta().tint(self.ITS_NOT_EASY, color=35).to_str() self.assert_its_not_easy_being_green(out) - def test_tint_takes_str_color_kwarg(self, capfd: CaptureFixture[str]): - Tinta().tint(self.ITS_NOT_EASY, color="green").print() - out = capfd.readouterr().out + def test_tint_takes_str_color_kwarg(self): + out = Tinta().tint(self.ITS_NOT_EASY, color="green").to_str() self.assert_its_not_easy_being_green(out)