youknowone / python-deadlib

Python dead batteries. See PEP 594.
8 stars 1 forks source link

mailcap tests missing `mailcap.txt` #18

Open lucas42 opened 4 days ago

lucas42 commented 4 days ago

The mailcap tests rely on a file called mailcap.txt - presumably this was in the python core.

...F...E.
======================================================================
ERROR: test_readmailcapfile (tests.test_mailcap.HelperFunctionTest.test_readmailcapfile)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mailcap/tests/test_mailcap.py", line 96, in test_readmailcapfile
    with open(MAILCAPFILE, 'r') as mcf:
         ~~~~^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'mailcap.txt'

======================================================================
FAIL: test_mock_getcaps (tests.test_mailcap.GetcapsTest.test_mock_getcaps)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mailcap/tests/test_mailcap.py", line 148, in test_mock_getcaps
    self.assertDictEqual(caps, MAILCAPDICT)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: {} != {'application/x-movie': [{'compose': 'movi[1452 chars] 8}]}
Diff is 2367 characters long. Set self.maxDiff to None to see it.

----------------------------------------------------------------------
Ran 9 tests in 0.002s
lucas42 commented 4 days ago

This appears to be the missing file: https://github.com/python/cpython/blob/3.12/Lib/test/mailcap.txt