Closed petri closed 3 years ago
I have no access to a PC right now, but I will have a look this evening.
I wonder whether this regression was introduced by my "f-strings" commit, which was autogenerated by pyupgrade or whether this was broken before. Either way. I should have tested the change at least manually.
Anyway, afair __str__
has no coverage. Yet another good reason to aim for 100% (#92 ).
Note
The str
representation was broken for Python 3 from the beginning.
I checked out an older commit where Python 2.7 was still supported, so I had a chance to see what's a correct str
representation should look like:
tnefparse on HEAD (ae186c2) via 🐍 v2.7.17 (venv)
❯ python
Python 2.7.17 (default, Sep 30 2020, 13:38:04)
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from tnefparse import TNEF
>>> t = TNEF(open("tests/examples/one-file.tnef", mode="rb").read())
>>> t
<tnefparse.tnef.TNEF object at 0x7f4a67ba9150>
>>> str(t)
'<TNEF:0x237, 1 attachments>'