koodaamo / tnefparse

a TNEF decoding library written in python, without external dependencies
GNU Lesser General Public License v3.0
49 stars 37 forks source link

Fix exception handling when TNEF raises a ValueError #83

Closed jugmac00 closed 3 years ago

jugmac00 commented 3 years ago

In an uncovered path exc.message was used, which is Python 2 only syntax.

This has been updated.

As a suitable TNEF file is missing, the test makes heavy usage of mock.

If a suitable test file can be found, the test should be rewritten.

This fixes #82

modified: tests/test_cmdline.py modified: tnefparse/cmdline.py

codecov[bot] commented 3 years ago

Codecov Report

Merging #83 (78dd9c2) into master (a9668ef) will increase coverage by 0.15%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #83      +/-   ##
==========================================
+ Coverage   92.90%   93.05%   +0.15%     
==========================================
  Files           7        7              
  Lines        1296     1296              
  Branches      117      117              
==========================================
+ Hits         1204     1206       +2     
+ Misses         70       68       -2     
  Partials       22       22              
Impacted Files Coverage Δ
cmdline.py 88.88% <0.00%> (+2.77%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a9668ef...78dd9c2. Read the comment docs.