Unverified Commit 298d3d05 authored by natsukium's avatar natsukium
Browse files

python312Packages.mail-parser: refactor test

parent d91a2832
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -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