Skip to content

Commit

Permalink
format the style.
Browse files Browse the repository at this point in the history
  • Loading branch information
onlyacat committed Sep 22, 2022
1 parent 86ebeec commit 68cd446
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ def test_print_json_ensure_ascii():
expected = '\x1b[1m{\x1b[0m\n \x1b[1;34m"foo"\x1b[0m: \x1b[32m"💩"\x1b[0m\n\x1b[1m}\x1b[0m\n'
assert result == expected


def test_print_json_with_default_ensure_ascii():
console = Console(file=io.StringIO(), color_system="truecolor")
console.print_json(data={"foo": "💩"})
Expand All @@ -247,6 +248,7 @@ def test_print_json_with_default_ensure_ascii():
expected = '\x1b[1m{\x1b[0m\n \x1b[1;34m"foo"\x1b[0m: \x1b[32m"💩"\x1b[0m\n\x1b[1m}\x1b[0m\n'
assert result == expected


def test_print_json_indent_none():
console = Console(file=io.StringIO(), color_system="truecolor")
data = {"name": "apple", "count": 1}
Expand Down

0 comments on commit 68cd446

Please sign in to comment.