From 2b62cb8c4be08b541cf8eee71ca7c731af7100b5 Mon Sep 17 00:00:00 2001 From: Oleksandr Kozachuk Date: Sat, 9 Sep 2023 19:24:45 +0200 Subject: [PATCH] Remove the `-*terminal_width()` to save space on screen. --- chatmastermind/chat.py | 1 - tests/test_chat.py | 14 +------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/chatmastermind/chat.py b/chatmastermind/chat.py index 7c4dd35..dd18293 100644 --- a/chatmastermind/chat.py +++ b/chatmastermind/chat.py @@ -204,7 +204,6 @@ class Chat: output.append(message.to_str(source_code_only=True)) continue output.append(message.to_str(with_tags, with_files)) - output.append('\n' + ('-' * terminal_width()) + '\n') if paged: print_paged('\n'.join(output)) else: diff --git a/tests/test_chat.py b/tests/test_chat.py index 1916a2b..f34cb24 100644 --- a/tests/test_chat.py +++ b/tests/test_chat.py @@ -6,7 +6,7 @@ from io import StringIO from unittest.mock import patch from chatmastermind.tags import TagLine from chatmastermind.message import Message, Question, Answer, Tag, MessageFilter -from chatmastermind.chat import Chat, ChatDB, terminal_width, ChatError +from chatmastermind.chat import Chat, ChatDB, ChatError class TestChat(unittest.TestCase): @@ -92,16 +92,10 @@ class TestChat(unittest.TestCase): Question 1 {Answer.txt_header} Answer 1 - -{'-'*terminal_width()} - {Question.txt_header} Question 2 {Answer.txt_header} Answer 2 - -{'-'*terminal_width()} - """ self.assertEqual(mock_stdout.getvalue(), expected_output) @@ -115,18 +109,12 @@ FILE: 0001.txt Question 1 {Answer.txt_header} Answer 1 - -{'-'*terminal_width()} - {TagLine.prefix} btag2 FILE: 0002.txt {Question.txt_header} Question 2 {Answer.txt_header} Answer 2 - -{'-'*terminal_width()} - """ self.assertEqual(mock_stdout.getvalue(), expected_output)