From 48669e5f53d9260a324d5e6cc74519bcf5512586 Mon Sep 17 00:00:00 2001 From: taizan-hokouto <55448286+taizan-hokuto@users.noreply.github.com> Date: Mon, 16 Nov 2020 23:29:24 +0900 Subject: [PATCH] Fix tests --- tests/test_default_processor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_default_processor.py b/tests/test_default_processor.py index 819a6da..2b00862 100644 --- a/tests/test_default_processor.py +++ b/tests/test_default_processor.py @@ -1,5 +1,6 @@ import json from datetime import datetime +from test.support import captured_stdout from pytchat.parser.live import Parser from pytchat.processors.default.processor import DefaultProcessor @@ -255,7 +256,7 @@ def test_jsonify_item(mocker): ret = processor.process([data]).items[0].json() tobe = _open_file("tests/testdata/default/jsonified_item.json") - assert ret == tobe + assert ret == tobe.splitlines()[0] def test_jsonify_item(mocker): @@ -273,8 +274,7 @@ def test_jsonify_item(mocker): ret = processor.process([data]).items[0].json() tobe = _open_file("tests/testdata/default/jsonified_item.json") - assert ret == tobe - + assert ret == tobe.splitlines()[0] def _open_file(path): with open(path, mode='r', encoding='utf-8') as f: