1. 22 Apr, 2024 2 commits
    • Carlos Ramos Carreño's avatar
      Normalize e-mail messages for comparison. · 2348985c
      Carlos Ramos Carreño authored
      The e-mail messages are normalized in a way compatible with both
      Python 2 and Python 3.
      
      In Python 2, the previous version added a `unixfrom`, which contains
      the date, making the tests fail when there is a change of one
      second in the clock between generating the first and the second
      message.
      Moreover, the second message contained a previous `unixfrom`.
      This has been solved by removing `unixfrom` in the normalized string.
      
      In Python 3, messages had an inconsistent folding, due to
      https://github.com/python/cpython/issues/72649 .
      This has been solved by manual unfolding (using a regex substitution)
      and by outputing normalized strings without folding (setting
      `maxheaderlen=0`, which means no maximum line lenght).
      
      With these changes, the normalized string can be compared in both
      versions without problems.
      2348985c
    • Carlos Ramos Carreño's avatar
      Fix encode/decode. · 40fd5c8e
      Carlos Ramos Carreño authored
      40fd5c8e
  2. 21 Apr, 2024 38 commits