title: How to avoid extra newline using "pytest_terminal_summary" hook
body: <p>In <code>conftest.py</code> I implemented this:</p>
  <pre class="lang-py prettyprint-override"><code>def pytest_terminal_summary(terminalreporter, exitstatus, config):
      terminalreporter.section(&quot;My session&quot;)
      terminalreporter.write(&quot;My message&quot;)
  </code></pre>
  <p>The output is exactly what I'm looking for:</p>
  <pre><code>====================================== test session starts ======================================
  
  ...                                    
  
  ========================================== My session ===========================================
  My message
  ================================ 1 passed, 8 deselected in 2.06s ================================
  </code></pre>
  <hr />
  <p>However, when the tests fail it look like this:</p>
  <pre><code>========================================== My session ===========================================
  My message==================================== short test summary info ====================================
  FAILED tests/test_example.py::test_example - assert 0
  ================================ 1 failed, 8 deselected in 2.32s ================================
  </code></pre>
  <p>The newline is missing.</p>
  <p>Instead of <code>terminalreporter.write()</code> I also tried <code>terminalreporter.line()</code> but in this case, the output when there is no error is incorrect:</p>
  <pre><code>========================================== My session ===========================================
  My message
  
  ================================ 1 passed, 8 deselected in 2.07s ================================
  </code></pre>
  <p>I also tried with <code>terminalreporter.write_line()</code>:</p>
  <pre><code>========================================== My session ===========================================
  
  My message
  ================================ 1 passed, 8 deselected in 2.03s ================================
  </code></pre>
  <p>None provide the solution I'm looking for with the proper new lines.</p>
  <p>Of course I could check the value of <code>exitstatus</code> and add extra newline if needed, but does it exist a more elegant way to simply write a line to the terminal without extra one?</p>