python312Packages.mail-parser: refactor test

This commit is contained in:
natsukium 2024-10-29 17:32:47 +09:00
parent d91a2832bd
commit 298d3d05f2
No known key found for this signature in database
GPG Key ID: 9EA45A31DB994C53

View File

@ -4,6 +4,8 @@
python,
glibcLocales,
fetchFromGitHub,
pytest-cov-stub,
pytestCheckHook,
setuptools,
six,
}:
@ -32,9 +34,15 @@ buildPythonPackage rec {
six
];
pythonImportsCheck = [ "mailparser" ];
nativeCheckInputs = [
pytest-cov-stub
pytestCheckHook
];
# Taken from .travis.yml
checkPhase = ''
${python.interpreter} tests/test_main.py
postCheck = ''
${python.interpreter} -m mailparser -v
${python.interpreter} -m mailparser -h
${python.interpreter} -m mailparser -f tests/mails/mail_malformed_3 -j