@@ -15,9 +15,7 @@ def test_write_log_file(tmp_path):
1515 encoding = "utf-8"
1616 ) == '{"lvl": "info", "msg": "Hello, world", "dt": "2021-04-08T18:42:25.139513"}\n '
1717
18- assert (
19- html_file .read_text (encoding = "utf-8" )
20- == """<!DOCTYPE html>
18+ assert html_file .read_text (encoding = "utf-8" ) == """<!DOCTYPE html>
2119<html lang="en">
2220<head>
2321 <title>TuxTest log</title>
@@ -40,7 +38,6 @@ def test_write_log_file(tmp_path):
4038</pre>
4139</body>
4240</html>"""
43- )
4441 assert text_file .read_text (encoding = "utf-8" ) == ""
4542
4643
@@ -70,9 +67,7 @@ def test_write_stdout_logs(capsys, tmp_path):
7067 yaml_file .read_text (encoding = "utf-8" )
7168 == """- {"lvl": "info", "msg": "Hello, world", "dt": "2021-04-08T18:42:25.139513"}\n """
7269 )
73- assert (
74- html_file .read_text (encoding = "utf-8" )
75- == """<!DOCTYPE html>
70+ assert html_file .read_text (encoding = "utf-8" ) == """<!DOCTYPE html>
7671<html lang="en">
7772<head>
7873 <title>TuxTest log</title>
@@ -95,7 +90,6 @@ def test_write_stdout_logs(capsys, tmp_path):
9590</pre>
9691</body>
9792</html>"""
98- )
9993 assert text_file .read_text (encoding = "utf-8" ) == ""
10094
10195
@@ -125,9 +119,7 @@ def test_write_stdout_feedback_logs(capsys, tmp_path):
125119 yaml_file .read_text (encoding = "utf-8" )
126120 == """- {"lvl": "feedback", "msg": "Hello, world", "dt": "2021-04-08T18:42:25.139513", "ns": "testing"}\n """
127121 )
128- assert (
129- html_file .read_text (encoding = "utf-8" )
130- == """<!DOCTYPE html>
122+ assert html_file .read_text (encoding = "utf-8" ) == """<!DOCTYPE html>
131123<html lang="en">
132124<head>
133125 <title>TuxTest log</title>
@@ -151,7 +143,6 @@ def test_write_stdout_feedback_logs(capsys, tmp_path):
151143</pre>
152144</body>
153145</html>"""
154- )
155146 assert text_file .read_text (encoding = "utf-8" ) == "<testing> Hello, world\n "
156147
157148
@@ -164,14 +155,11 @@ def test_writer_invalid_yaml(capsys, tmpdir):
164155 writer .write (data )
165156 writer .write ("{hello: world}" )
166157 out , err = capsys .readouterr ()
167- assert (
168- out
169- == """{
158+ assert out == """{
170159hello world
171160{}
172161{hello: world}
173162"""
174- )
175163 assert err == ""
176164 assert (tmpdir / "logs" ).read_text (
177165 encoding = "utf-8"
0 commit comments