diff --git a/cibuildwheel/logger.py b/cibuildwheel/logger.py index 0f7df826..dad70309 100644 --- a/cibuildwheel/logger.py +++ b/cibuildwheel/logger.py @@ -242,7 +242,7 @@ class Logger: github_summary = self._github_step_summary(duration=duration, options=options) Path(summary_path).write_text(filter_ansi_codes(github_summary), encoding="utf-8") - n_wheels = len([info for info in self.summary if not info.filename]) + n_wheels = len([info for info in self.summary if info.filename]) s = "s" if n_wheels > 1 else "" duration_str = humanize.naturaldelta(duration) print() diff --git a/unit_test/wheel_print_test.py b/unit_test/wheel_print_test.py index a7989f66..b7e6953f 100644 --- a/unit_test/wheel_print_test.py +++ b/unit_test/wheel_print_test.py @@ -15,9 +15,11 @@ def test_printout_wheels(capsys): log.colors_enabled = False with log.print_summary(options=OPTIONS_DEFAULTS): + # the number of BuildInfo with & without filename shall be different for this test log.summary = [ BuildInfo(identifier="id1", filename=None, duration=3), BuildInfo(identifier="id2", filename=FILE, duration=2), + BuildInfo(identifier="id3", filename=FILE, duration=3), ] captured = capsys.readouterr() @@ -25,7 +27,8 @@ def test_printout_wheels(capsys): assert "id1" in captured.out assert "id2" in captured.out - assert "1 wheel produced in" in captured.out + assert "id3" in captured.out + assert "2 wheels produced in" in captured.out assert "SHA256=" in captured.out