Skip to content

Commit

Permalink
test: Use non-heavy header border for Windows compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Pepe committed Dec 14, 2023
1 parent e206bd4 commit 889ee15
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
5 changes: 3 additions & 2 deletions src/voraus_template_updater/_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from github.PullRequest import PullRequest
from pydantic import BaseModel, ConfigDict
from rich import box
from rich.console import Console
from rich.table import Table
from rich.text import Text
Expand Down Expand Up @@ -71,7 +72,7 @@ def print(self) -> None:

def _print_table_of_projects(projects: List[Project]) -> None:
title = _get_table_title(projects)
table = Table(title=title)
table = Table(title=title, box=box.SQUARE)
table.add_column("Maintainer")
table.add_column("Projects")

Expand Down Expand Up @@ -150,7 +151,7 @@ def _get_projects_by_maintainer(projects: List[Project]) -> Dict[Optional[str],


def _print_table_of_skipped_projects(projects: List[SkippedProject]) -> None:
table = Table(title=f"Skipped projects: {len(projects)}")
table = Table(title=f"Skipped projects: {len(projects)}", box=box.SQUARE)
table.add_column("Project")
table.add_column("URL")
table.add_column("Skip reason")
Expand Down
12 changes: 6 additions & 6 deletions tests/resources/example_summary_output.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Projects: 7 Outdated: 4 Up to date: 3
┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
Maintainer Projects
┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
┌──────────────┬────────────────────────────────────────────────────────┐
Maintainer Projects
├──────────────┼────────────────────────────────────────────────────────┤
│ maintainer-1 │ Project: project-1 │
│ │ URL: https://project1.com │
│ │ Status: Up to date │
Expand Down Expand Up @@ -63,9 +63,9 @@


Skipped projects: 3
┏━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
Project URL Skip reason
┡━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩
┌────────────┬───────────────────────┬──────────────────┐
Project URL Skip reason
├────────────┼───────────────────────┼──────────────────┤
│ project-9 │ https://project9.com │ No .cruft.json │
│ project-11 │ https://project11.com │ No .cruft.json │
│ project-10 │ https://project10.com │ Project archived │
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ def test_summary_printing(datetime_mock: MagicMock, capsys: CaptureFixture, reso
summary.print()
stdout = capsys.readouterr().out

assert stdout == (resource_dir / "example_summary_output.txt").read_text()
assert stdout == (resource_dir / "example_summary_output.txt").read_text(encoding="utf-8")

0 comments on commit 889ee15

Please sign in to comment.